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