Top Stories published by theburningmonk.com in 2011

Performance Test — BinaryFormatter vs Protobuf-Net

Note: don’t forget to check out the Benchmarks page to see the latest round up of binary and JSON serializers.

When working with the BinaryFormatter class frequently, one of the things you notice is that it is really…


Turn ExpandoObject into static type

As many others have shown, the new ExpandoObject introduced in C# 4 can be pretty useful in some scenarios.

However, on the odd occasion when you want to convert an ExpandoObject to a static type you have defined you can be forgiven for…


F# — yield vs yield!

C# developers should be familiar with the yield keyword that was introduced in C# 2.0, and you’ll be pleased to know that F# also has the yield keyword which works in conjunction with F#’s equivalent of IEnumerable — sequences.


F# — From string to byte array and back

There’re a number of built-in literal types in F#, and one of the cool things you can do is to get the byte or byte array representation of a char or string using the ‘B’ suffix, the result is the same as Encoding.ASCII.GetBytes:

These were the top 10 stories published by theburningmonk.com in 2011. You can also dive into monthly archives for 2011 by using the calendar at the top of this page.