TakeWhile Extension Method in C#

TakeWhile Extension Method – I am amazed at how the C# language can teach me something new. I have come to the conclusion that it is basically impossible for a developer to know all there is about a given programming language (unless you are Jon Skeet of course). We learn as we need. I need to do xyz in code, so I research and find a way. Therefore I learn something new. The next time I will know how to do this. That is how we learn more about a particular language. Today I had a requirement to loop through a List<int> and stop the loop if the value in the list equaled zero. The TakeWhile Extension Method was the perfect fit. (more…)

Continue ReadingTakeWhile Extension Method in C#