U
Udi
Hi,
given a member in a class, I would like to print it's name
automatically (via reflection i guess).
Say I have an ArrayList of objects that contains references to members
of a derived class.
How do I retrieve their names?
Example:
class Base
{
protected ArrayList members;
public string PrintMembersNames()
{
//How to print here the names of my members? i.e "myInt"
}
}
Class Derived : Base
{
int myInt = 0;
public Derived()
{
members.Add( myInt );
}
}
Thanks,
Udi.
given a member in a class, I would like to print it's name
automatically (via reflection i guess).
Say I have an ArrayList of objects that contains references to members
of a derived class.
How do I retrieve their names?
Example:
class Base
{
protected ArrayList members;
public string PrintMembersNames()
{
//How to print here the names of my members? i.e "myInt"
}
}
Class Derived : Base
{
int myInt = 0;
public Derived()
{
members.Add( myInt );
}
}
Thanks,
Udi.