Programming

Functional programming with Linq – Enumerable.SequenceEqual

Yet another useful method on the Enumerable class, the SequenceEqual method does exactly what it says on the tin and tells you whether or not two sequences are of equal length and their corresponding elements are equal according to either the default or supplied equality comparer: As you know, for reference types the default equality …

Functional programming with Linq – Enumerable.SequenceEqual Read More »

Converting a binary string representation into binary array in C#

Stumbled across this question on StackOverflow the other day, definitely one for the interview! The question goes: How do you convert a string such as “01110100011001010111001101110100” to a byte array then used File.WriteAllBytes such that the exact binary string is the binary of the file. In this case it would be the the text “test”. …

Converting a binary string representation into binary array in C# Read More »

WCF – Be ware of the field ordering when using DataContractSerializer

One of the less known aspect of the DataContractSerializer is its dependency on the order in which fields are serialized and deserialized. As this article points out, the basic rules for ordering include: If a data contract type is a part of an inheritance hierarchy, data members of its base types are always first in …

WCF – Be ware of the field ordering when using DataContractSerializer Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close