new for LINQ and would like to know why the error is the best way to solve.
I get: “It is not possible to implicitly convert the type“ System.Collections.Generic.IEnumerable ”to“ System.Collections.Generic.List. "An explicit conversion exists (are you skipping listing?) 'Error
List<string> names = new List<string>();
names.Add("audi a2");
names.Add("audi a4");
List<string> result1 = new List<string>();
result1=(from name in names
where name.Contains("a2")
select name);
source
share