Is this possible to do in C#?
I have POCO object here is definition:
public class Human
{
public string Name{get;set;}
public int Age{get;set;}
public int Weight{get;set;}
}
I would like to map properties of object Human to string array.
Something like this:
Human hObj = new Human{Name="Xi",Age=16,Weight=50};
Or I can have List<Human>:
string [] props = new string [COUNT OF hObj PROPERTIES];
foreach(var prop in hObj PROPERTIES)
{
props["NAME OF PROPERTIES"] = hObj PROPERTIES VALUE
}