I get this error message:
The type arguments for method \'System.Linq.Enumerable.Select(System.Collections.Generic.IE
What is the return type of ObservableCollection
? Typically an Add
method returns void. You can't use LINQ Select
to execute a procedure for all elements, only a function that returns something (else where would the return value of Select
come from?). Instead you can use LINQ ForEach
or the C# foreach loop.