Posts Tagged question

Interesting Linq Problem

Check out the code below:

using System.Linq;
class Program
{
  static void Main()
  { 
      int[] data = { 1, 2, 3, 1, 2, 1 };
      foreach (var m in from m in data orderby m select m)
            System.Console.Write(m);
  }
}

Now, the question is:

frustration3  Is this code valid or not??

  If valid, how?

  If not valid, why?

(Source: Eric Lippert’s Blog)

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

,

2 Comments

Get Adobe Flash playerPlugin by wpburn.com wordpress themes