Skip to main content
added 56 characters in body
Source Link
SSW
  • 3
  • 4

I have the code below: 
List<XElement> DBListSetxElements = DbListSetItems[0].Value.Root.Descendants("ListSet").Select(desc => desc.Attribute("Name")).Distinct().ToList();

While compile getting error Error CS0029 Cannot implicitly convert type 'System.Collections.Generic.List<string>' to 'System.Collections.Generic.List<System.Xml.Linq.XElement>'

Need Help.

I have the code below: List<XElement> DBListSetxElements = DbListSetItems[0].Value.Root.Descendants("ListSet").Select(desc => desc.Attribute("Name")).Distinct().ToList();

While compile getting error Error CS0029 Cannot implicitly convert type 'System.Collections.Generic.List<string>' to 'System.Collections.Generic.List<System.Xml.Linq.XElement>'

Need Help.

I have the code below: 
List<XElement> DBListSetxElements = DbListSetItems[0].Value.Root.Descendants("ListSet").Select(desc => desc.Attribute("Name")).Distinct().ToList();

While compile getting error Error CS0029 Cannot implicitly convert type 'System.Collections.Generic.List<string>' to 'System.Collections.Generic.List<System.Xml.Linq.XElement>'

Need Help.

Source Link
SSW
  • 3
  • 4

Cannot implicitly convert type 'System.Collections.Generic.List<string>' to 'System.Collections.Generic.List<System.Xml.Linq.XElement>'

I have the code below: List<XElement> DBListSetxElements = DbListSetItems[0].Value.Root.Descendants("ListSet").Select(desc => desc.Attribute("Name")).Distinct().ToList();

While compile getting error Error CS0029 Cannot implicitly convert type 'System.Collections.Generic.List<string>' to 'System.Collections.Generic.List<System.Xml.Linq.XElement>'

Need Help.

lang-cs