I have a LinkedList<Point>
which I'm trying to apply a lambda to:
LinkedList<Point> node = LinkedPoints.Where<Point>(x => x.X + x.Y / someValue % 2 == 0);
..where LinkedPoints
is a LinkedList<Point>
. I want to create a new LinkedList<Point>
from the original where the coordinates of the Point
added together and divided by some value results in an even number. The actual condition of the lambda isn't important because currently the code above does not work, and I'd like to know why and how I can make it work.
I think that this lambda is operating on Point
and so it'll return List<Point>
however I want a new LinkedList<Point>
- how can I achieve this?