I'm getting the following error:
Cannot implicitly convert type 'System.Collections.Generic.List>' to 'System.Collections.Generic.List
The code I have is:
class Check
{
public string Text { get; set; }
public List<Check> getxml()
{
XDocument xdoc = XDocument.Load(@"D:\Web Utf-8 Converter\Categories.xml");
var list = (from p in xdoc.Descendants("Categories")
select p.Elements("name"));
var listing = list.ToList();
return listing;
}
}
This seems to me like a conversion error. But I'm not sure how to convert. Kindly assist.
Thank you.