how would I create and then access a collection of a (Sorted)Dictionary?
It could be a Series<SortedDictionary<double, MyClass>> or a Dictionary<int, SortedDictionary<double, MyClass>> for example.
Series[0] = sortedDict;
Dict.Add(myInt, sortedDict);
For some reason, when doing it like this, the Dictionary is empty, when accessing values with a loop and the series seems to be empty as well.
for (int i = 0; i < Dict.Count; i++)
{
SortedDictionary<double, MyClass> sortedDictPair = Dict.ElementAt(i).Value;
foreach (var item in sortedDictPair)
{
Print(item.Key);
MyClass myClass= item.Value;
Print(myClass.classMember);
}
}
SortedDictionary<double, MyClass> sortedDictPair = Series[0];
for (int j = 0; j < sortedDictPair.Count; j++)
{
MyClass myClass = sortedDictPair.ElementAt(j).Value;
Print(myClass.classMember);
}
}
Is there something I am overseeing? Edit: when I let it print the sortedDict before aissgning it, it is full of entries.
