TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
aravind Gosh
NA
3
2.2k
Help with this Lamda Expression
Jan 11 2011 3:52 AM
Hi,
I am learning Lamda Expressions and I find it hard to understand the below expression. Can some one please explain. I took it from msdn.
int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };
var firstSmallNumbers = numbers.TakeWhile((n, index) => n >= index);
As per my understanding the above expression is trying to get all the numbers whose value >= its position. So the output should be(values): 5,4,3,9,8,7 and index(0,1,3,4,5,6,7)
But the original output is 5,4
Appreicate your help.
Thanks.
Aravind
Reply
Answers (
3
)
XAML and ASP.NET
how can i give the click event to label in asp.net