1
Answer

determining the type from the value of the constant field

Dheenadhayalan

Dheenadhayalan

15y
2.9k
1
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)