7 tricks to simplify your programs with LINQ

May 22, 2008 01:06 by admin

Igor Ostrovsky has a post about 7 tricks to simplify your programs with LINQ.

#1 is pretty cool:

int[] a = Enumerable.Repeat(-1, 10).ToArray();
int[] b = Enumerable.Range(0, 10).ToArray();
int[] c = Enumerable.Range(0, 10).Select(i => 100 + 10 * i).ToArray();

I disagree with #2 - it has serious performance implications.  Go check out the link to see them all...


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

January 5. 2009 23:34