M
mota
Hi,
in VS2010 (.NET4) I get runtime-error:
Unable to cast object of type '<UnionIterator> ... to type
'System.Collections.Generic.HashSet ...
when aggregating unions of hashsets in collection like:
Dictionary<CustomType1,
HashSet<CustomType2>>.Values.Aggregate((workingSet, nextSet) =>
[System.InvalidCastException] (HashSet<CustomType2>)
workingSet.Union(nextSet)) [/System.InvalidCastException]
Debugger stops as marked by [System.InvalidCastException]
in VS2010 (.NET4) I get runtime-error:
Unable to cast object of type '<UnionIterator> ... to type
'System.Collections.Generic.HashSet ...
when aggregating unions of hashsets in collection like:
Dictionary<CustomType1,
HashSet<CustomType2>>.Values.Aggregate((workingSet, nextSet) =>
[System.InvalidCastException] (HashSet<CustomType2>)
workingSet.Union(nextSet)) [/System.InvalidCastException]
Debugger stops as marked by [System.InvalidCastException]