Browse by Tags
All Tags »
C# 3.0 »
software C# language (
RSS)
I'll bet a hundred bucks that any entry level C++ interview or exam will somehow drift into questions about the pre and post increment operators. It's almost become a canonical, rite of passage sort of thing. Now using the operators is one thing...
Implementing IEnumerable<T> can turn out to be tricky in certain cases. Consider the following code snippet namespace Test { class Program { static void Main( string [] args) { Consume( new List < string >() { "a" , "b"...
Tee is a cool function that "clones" enumerators whatever their current state is - it basically allows you to branch off an enumerator into as many enumerators as you want, all independent of each other. You can do something like List<int>...
There is a description of the bug here . The following piece of code demonstrates the bug. class Program { interface I { int X { get; set; } } struct S : I { public int X { get; set; } } static void Main(string[] args) { Func<S>(); } static void...
Local variable type inferencing is a new feature in C# 3.5 - a very "handy" one, in that it saves a lot of typing. Basically, it lets you do var dict = new Dictionary<string, List<int, Dictionary<int, string>>>(); instead of...