Please don’t tell me to use enum instead. How do I check if “testStr” is in the struct “Supplier”?
public struct Supplier {
public const string
NA = "N/A",
companyA = "companyA",
companyB = "companyB";
}
string testStr = "companyA";
This can be achieved via reflection: