I have array of arrays. Suppose I want to count how much elements out of all 9 is equal to "a".
string[][] arr = new string[3][] {
new string[]{"a","b","c"},
new string[]{"d","a","f"},
new string[]{"g","a","a"}
};
How can I do it using Enumerable extension methods (Count, Where, etc)?
.SelectMany(a => a).Count(a => a == "a")?