Tried searching online. But couldn't find an answer:
public class A
{
public Dictionary<int, string> Dict { get; } = new Dictionary<int, string>();
}
var list = new List<A>();
var a = new A();
a.Dict.Add(1, "A");
var b = new A();
b.Dict.Add(2, "A");
list.Add(a);
list.Add(b);
How to get the maximum and minimum key in dictionary.
max key is 2 and min key is 1.
var max = list.Max(e => e.Dict.??); //