I didn't knew how to make an enumerable with an yield.
http://csharpindepth.com/Articles/Chapter11/StreamingAndIter...
I had used it to make a state machine but didn't know its relation to IEnumerable. The article was enlightening to a C# latecomer like me.
Re:Hidden features of C#
by blangblang on Monday January 09, 2012 @02:08PM
(#3443788)
I agree that 'hidden' isn't exactly an accurate description, but that is a pretty good list of keywords that commonly get reinvented by less experienced C#-ers. It would be more accurately described as a list of underused idioms, but the title doesn't really detract from its value.
I don't want to sound snobbish, but at least 90% of that list I consider as a basic C# knowledge. If you don't know how to make an enumerable with yield, or insert some debug code with DEBUG or guard resource with using(), what exactly you know?