I've encountered an issue with the SelectMany expression that I just can't wrap my head around.
Consider this: I have a collection of objects of this class
class Tag
{
string DisplayText { get; set; }
string Key { get; set; }
int Value { get; set; }
}
Now I'm trying to get all my display texts (actually part of a much more complex expression):
var texts = AvailableTags.SelectMany(t => t.DisplayText);
Now why does this return me an IEnumerable<char>
instead of an IEnumerable<string>
??? Am I missing something?