I want to set an String in one Line with help of .SelectMany().
I have an Object, which holds an Dictionary<String,FileInfo>. For each element into these Dictionary I want to got the Key to put into String.Format(), but i always get "System.Linq.Enumerable+<SelectManyIterator>d__142[System.String,System.Char]" as returnvalue.
Where is my fault?
String.Format(
"All Strings : {0} on {1} ",
MyObject.MyDictionary.Keys.SelectMany(x => x),
MyObject.Type);
The SelectMany will return an IEnumerable, that’s why, you’ll need to get the keys into a string, like so: