Hi All
Is there a way to Take a given XML file and convert (preferably using C# Generics) it into a Concrete Ienumerable list of T where T is my concrete class
So for example I may have an XML file like
<fruits>
<fruit>
<id>1</id>
<name>apple</name>
</fruit>
<fruit>
<id>2</id>
<name>orange</name>
</fruit>
</fruits>
and I would like to see a list of a Fruit Objects
where it has properties like
public class Fruit : IFruit
{
public string name;
public int id;
}
I assume I'd need some kind of Mapping if I was to use generics, as I would like this to work for ideally the IFruit interface (not sure if thats possible)
Thanks in advance