Hello,
I am trying to use c# Range features with List.
What am I missing to make it work?
- int[] arrayTest = new int[] {1,2,3,4,5 };
- int[] arrayRange = arrayTest[1..^2]; // Works!
-
- List<int> listTest = new List<int>() {1,2,3,4,5 };
- var listRange = listTest[1..^2]; // does not work.
Thanks!