determining the type from the value of the constant field

Jun 30 2009 1:25 AM
I've to find the type provided i have a string value which is equal to the constant field of the particular class.. say,
class A:Base1
{
public const string a1 = "XYZ";
}
class B:Base1
{
public const string a1 = "ABC";
}

and i have a string value with either"ABC" or "XYZ".. So with the value of this string i need to determine the class type either A or B..
any idea..
Thanks in advance..
ask me if any clarification is needed

Answers (1)