News for hackers. Stuff that matters.
Re:Why I absolutely love java by nrkn on Tuesday February 08, 2011 @07:56PM (#2195679)
Hi David :)

You can drop the parentheses, and int is inferred by the compiler:

var filtered = new[]{ 1, 2, 3, 4 }.Where( i => i % 2 != 0 );

Alternatively:

var filtered = Enumerable.Range( 1, 4 ).Where( i => i % 2 > 0 );

There are no comments on this comment yet.