Things I learnt reading C# specifications (#1)

After reading Jon Skeet’s excellent C# in Depth - again (3rd edition - to be published soon) I’ve decide to try and actually read the C# language specification…Being a sensible kind of guy I’ve decided to purchase the annotated version which only cover topics up to .NET 4 – but has priceless comments from several … Continue reading Things I learnt reading C# specifications (#1)

Serialization and events in C#

Today I had an interesting problem:I was trying to serialize and object using BinaryFormatter but it kept on failing because some class was not Serializable. I’ve double and triple checked my class and all of it’s inner properties and verified that indeed they were marked correctly.The ProblemLooking closer at the exception I’ve noticed something – … Continue reading Serialization and events in C#

Making string based method strongly typed

I can't believe they implemented this way – was the first thought on my mind…The method in question is part of the new(er) NUnit’s constraint based model specifically the one used to assert a property value.Before we dive deeper a few words on the constraint based model:constraint based modelMost unit testing framework have similar way … Continue reading Making string based method strongly typed