R
rettigcd
I have several classes that all have the same static member:
class A{
public static string Table = "TableA";
}
class B{
public static string Table = "TableB";
}
none of the classes inherit from a common base class or interface.
How can I use reflection to get the value stored in A.Table and
B.Table?
I found examples that called static member functions but none that
accessed non-function/non-property.
I'm simply trying associate a string with a class and not with a
particular instance of that class. I could create an interface but I
don't want to have to create an instance just to access a static
member.
thanks.
Dean
class A{
public static string Table = "TableA";
}
class B{
public static string Table = "TableB";
}
none of the classes inherit from a common base class or interface.
How can I use reflection to get the value stored in A.Table and
B.Table?
I found examples that called static member functions but none that
accessed non-function/non-property.
I'm simply trying associate a string with a class and not with a
particular instance of that class. I could create an interface but I
don't want to have to create an instance just to access a static
member.
thanks.
Dean