C-Sharp

Fun with LINQ Aggregate

Say we’ve got a CSV file:private const string csv = @"1,2,3,4,56,7,8,9,1011,12,13,14,1516,17,18,19,20";We want to parse it into nested...

0 replies - 286 views - 11/16/09 by mikehadlow in News

Legacy Code: Sensing

In 'Working Effectively With Legacy Code' Michael Feathers describes two reasons for wanting to break dependencies in our code – to allow separation and...

0 replies - 177 views - 11/11/09 by markhneedham in News

Extension Methods Ain't Trojan Horses - A Tale on a Covariant City Built in and Protected By C# 4.0

IntroductionToday, a colleague and I were playing with new C# 4.0 and BCL 4.0 features, me trying (and succeeding I think) to convince my co-worker about the...

0 replies - 397 views - 10/23/09 by bdesmet in News

TDD: Tests That Give Us a False Confidence of Coverage

During J.B. Rainsberger's presentation at Agile 2009 titled 'Integration tests are a scam' he suggests that having lots of integrationt tests covering our...

0 replies - 1150 views - 09/24/09 by markhneedham in News

TDD: Test Only Constructors

I wrote previously how we'd been doing some work to change the way that we get a 'User' object into our system and one mistake that we made intially was to...

0 replies - 659 views - 09/13/09 by markhneedham in News

Storing an Image to a Database in .NET

Several weeks ago I mentioned that I store the images that the user uploads to the system into the database. Some of you have expressed an interest in how I do...

0 replies - 618 views - 09/11/09 by DaveMBush in News

Service Locator in MVVM

While doing MVVM one of the common problems to solve is to have the ViewModel consume entities that are “replaceable”. Let me give you an example so that...

0 replies - 554 views - 09/07/09 by Marlon Grech in News

Type-Free Lambda Calculus in C#, Pre-4.0 - Defining the Lambda Language Runtime (LLR)

A while back, I blogged about (Mis)using C# 4.0 Dynamic – Type-Free Lambda Calculus, Church Numerals, and more which was a fun post and got some good...

0 replies - 575 views - 09/04/09 by bdesmet in News

Coupling and Expressiveness

We came across an interesting situation in our code base recently whereby two coding approaches which I consider important for writing maintainable code seemed...

2 replies - 765 views - 08/26/09 by markhneedham in News

Visual Studio 2010 upgrade shows dynamic language capabilities

The upcoming Visual Studio 2010 release boosts interoperability between the Visual Basic and C# languages and dynamic languages, Microsoft's senior vice...

0 replies - 746 views - 08/21/09 by CodeJustin in News

Fun With the ?? Operator in C#: if { } or ?? – Which is Faster?

Yesterday evening at work a team member and I were pair programming.  We had a disagreement about how to code a few lines.  The question was around whether...

3 replies - 1894 views - 08/07/09 by Keith Elder in News

Garbage Collection Thread Suspension Delay (250ms Multiples)

About a week ago, Dima and I were consulting for two different teams at the same customer site, without even knowing about each other’s presence. Around the...

0 replies - 2375 views - 08/03/09 by sashag in News

Reading Code: Rhino Mocks

I spent a bit of time recently reading through some of the Rhino Mocks to get a basic understanding of how some features work under the hood. As well as just...

0 replies - 661 views - 07/31/09 by markhneedham in News

A First Look at MassTransit

Get the code for this post here.

0 replies - 1062 views - 07/24/09 by mikehadlow in News

How to Get the EventArgs as a CommandParameter Using the AttachedCommandBehavior

I have been asked many times how can I get the event args as a command parameter when using the AttachedCommandBehaviour. Well the library does not support...

0 replies - 475 views - 07/06/09 by Marlon Grech in News