I have a function that should accept two types of data - the MyClass Observable collection and the myclass two-dimensional array. The structure does not matter, because I use the linq query in this collection. For example - give me all the elements in the collection, where Myclass.Value == 3.
So, I created a function that takes a parameter of type IEnumerable<MyClass> , since both two-dimensional arrays and observable collections implement IEnumerable, and it should work.
However, when I try to pass the parameter myClass [,] to my function, a compile-time error occurs - The argument type Myclass [,] cannot be assigned to the parameter type IEnumerable<MyClass> .
What's wrong? thanks.
user1018711
source share