I have an array of integers int[] vals .
I want to use the linq query to get a list of points from this int array.
For example, if I have an array as follows:
vals = new int[]{20,25,34};
I need my list of points
var points = List<Point>{new Point(1,20),new Point(2,25),new Point(3,34)};
I want to use a local variable that is incremented by 1 for all int values ββin my array, which will be the x value of my point.
How can I achieve this result with LINQ in C #?
source share