Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As C# has some type inference, you can reduce it further:

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

Not bad for a static language. :)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: