I wanna know how to count number of global variable exist in class which i called.
I used parameter with Several types of inherited classes, which are different number of variable.
And if possible i want to get name of variable..
public class MotherClass
{
public int motherAge;
}
public class ChildClass : MotherClass {
public int childAge;
public string childName;
}
public void Main(MotherClass person) {
//count number of variable exist in "person"
//get name of variables exist in "person"
}