Class foo
{
public string name;
public int age;
public datetime BirthDate;
}
I have the above class.
I want the list of variables of the foo class.
I tried
foo fooObj= new foo();
fooObj.GetType().GetProperties()
This returned me 0 properties.
Obviously this wont work as there are no properties in class foo.