Der Typ System.Collections.Generic.IEnumerable <B> kann nicht implizit in System.Collections.Generic.List <B> konvertiert werden
Mit dem folgenden Code erhalte ich diese Fehlermeldung und benötige Hilfe bei der Rückgabe der Methode LoadList<B>
Der Typ System.Collections.Generic.IEnumerable kann nicht implizit in System.Collections.Generic.List konvertiert werden
public class A
{
public List<B> Load(Collection coll)
{
List<B> list = from x in coll select new B {Prop1 = x.title, Prop2 = x.dept};
return list;
}
}
public class B
{
public string Prop1 {get;set;}
public string Prop2 {get;set;}
}