Lazycoder

13Sep/051

LINQ TakeWhile SkipWhile

At first glance, the Take and Skip functions in LINQ appear to be replacements for every piece of code like this:

for(int count=0;count < foo.count;count++)
{
text = text + foo[count] + “,”;
}
text = text + foo[foo.count];

Which is very cool. I’m also reminded of blocks in Ruby. A while back on Don Boxs blog I saw him implement blocks in C# 2.0

The set operators look very cool. It’ll be interesting to see how they handle object arrays, reference vs. value types, and so forth.

Filed under: .NET, General Leave a comment
  • John Morales

    string sep = “”;
    for(int count=0;count


Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 6396779 bytes) in /home2/lazycode/public_html/weblog/wp-includes/wp-db.php on line 789