I'm trying to find the min/max number within a nested list using Linq.
An example class would be:
public class ListA { public HashSet<HashSet<int>> nestedList; public ListA() { nestedList = new HashSet<HashSet<int>>() { new HashSet<int> { 1, 3, 5, 7 }, new HashSet<int> { 2, 12, 7, 19 }, new HashSet<int> { 6, 9 , 3, 14 } }; } public int MaxNumber { // return the highest number in list } } In the example above, the minimum number would be 1 and the max number 19.
I'm struggling to get anything to get valid syntax. Anyone help?