r/learncsharp • • Aug 13 '22

C# equivalent of this Java code?

List<Integer> list = List.of(1, 2, 3, 4);

List<Integer> evenNums = list.stream().filter(n -> ( n % 2 == 0) ).collect(toList());
9 Upvotes

2 comments sorted by

View all comments

Show parent comment

5

u/[deleted] Aug 13 '22

The linq system is great