SRT Solutions

Blogs

Browse by Tags

  • Multithreading in C#

    Multithreading is something that seems to keep popping up on me when I am coding. My applications either need to do some crazy calculation (and not return 42) or a function will be waiting for a while before returning anything. Both of these leave my GUI locked up to the point where in Vista I get a...
    Posted to Coding with Great Hair (Weblog) by cmsears on Wed, Jul 23 2008
  • Q & A on a recent VSM Article

    One of my last Visual Studio Magazine article discussed object validation and object invariants. I received a great email discussing questions about how to handle UI validation in this world. My recommendation in the article was that classes should be responsible for their own state. Furthermore, they...
    Posted to Bill Blogs in C# (Weblog) by wwagner on Tue, Jul 22 2008
  • Spice Up Your C# Code With Currying

    Just because C# doesn't have language support for currying , doesn't mean you can't spice up your code by implementing currying methods yourself. Even better news is that, it's very easy to do. Let's look at the following code, to see how it's done: public static Func<T2, TR>...
    Posted to //TODO (Weblog) by cmarinos on Fri, Jul 11 2008
  • Charlie who?

    I did it, I started a blog. And I’ve gotta say, these first blog posts are pretty hard. There is the tried and true “about me” blog post, and there is the tactic of just writing a blog post like it’s a second post. But the fact of the matter is, this isn’t a second blog post. There may be people reading...
    Posted to Coding with Great Hair (Weblog) by cmsears on Mon, Jun 23 2008
  • Testing for Exceptions in Unit Test Frameworks

    In MSTest and nUnit, the typical way to test for exceptions is by using the [ExpectedException] attribute on a test method. I've always found this to be a little annoying, but it was just recently that I decided to do something better. Unsurprisingly, I'm not the first one to have this thought;...
    Posted to //TODO (Weblog) by cmarinos on Fri, Jun 6 2008
  • A Functional Programming Q & A

    I received this question in email from one of my readers, and I thought it would be of general interest: I find myself with two arrays of the same size and I want to create a third that combines each element. What I want is something similar to var S3 = S1.foreach(S2, (s1, s2) => s1 + s2); this would...
    Posted to Bill Blogs in C# (Weblog) by wwagner on Wed, Apr 23 2008
  • The Obligatory Post-MVP Summit Post

    Well, I'm back from the MVP Summit, and it seems that tradition mandates a summary of the trip. But there is one problem: The best content was all under NDA. Most MVPs spend their time with members of the product team for their award, and other teams that are related. For me, that obviously means...
    Posted to Bill Blogs in C# (Weblog) by wwagner on Tue, Apr 22 2008
  • Project Euler problem 6

    Euler Problem six asks you to find the difference between the sum of squares and the square of the sum for the natural numbers 1 through 100. I took the easy route, and made a brute force implementation in C#. There are a couple new bits of LINQ syntax here. This query creates two different anonymous...
    Posted to Bill Blogs in C# (Weblog) by wwagner on Fri, Apr 11 2008
  • SRT Polyglotting Euler Problems

    I was first introduced to the term polyglot when I was in high school. Our French class did a presentation at a Foreign Language Day. I have this vague recollection that the theme of the day was "Polyglots Have More Fun". I've always liked the word, so I was thrilled to see Neal Ford using...
    Posted to SRT Insights (Weblog) by dmarsh on Tue, Apr 8 2008
  • Euler Problem 5

    Well, it's time to post another solution and look at how LINQ and C# 3.0 can create elegant code for these problems. The fifth problem asks you to find the smallest number that is divisible by all the natural numbers from 1 through 20. You can trivially find the answer like this: 1 private static...
    Posted to Bill Blogs in C# (Weblog) by wwagner on Tue, Apr 8 2008

Ann Arbor Give Camp started with Jennifer Marsman , of Microsoft, wanting to organize an event to pull together the developer community in the Ann Arbor...