Ich habe versucht:Wie konvertiert `Dictionary <string, Wörterbuch <string, List <myCustomClass >>>` auf `Dictionary <string, List <myCustomClass >>`
endResult = tempResult.Where(x => x.Key.Equals(nameOfMyList))
.SelectMany(wert => wert as List<MyCustomClass>)
.Cast<Dictionary<string, List<MyCustomClass>>>().ToDictionary(); //error "can not convert type"
endResult
Dictionary<string, List<MyCustomClass>>
ist.
tempResult
ist Dictionary<string, Dictionary<string, List<MyCustomClass>>>
.
Was ist hier falsch?
AKTUALISIERT:
Sorry, ich schrieb endResult
Dictionary<string, List<MyCustomClass>>
und nichtDictionary<string, Dictionary<string, List<MyCustomClass>>>
(es aktualisiert)
Eigentlich möchte ich Dictionary<string, List<MyCustomClass>>
von Dictionary<string, Dictionary<string, List<MyCustomClass>>>
, Art der Umwandlung zu extrahieren,
Wahrscheinlich nur ein Tippfehler, aber nach Ihrem Thema Ich denke, Ihre "endresult" -Typ sollte Dictionary sein>. –
mein Beitrag – kkkk00999