Is it theoretically possible to lookup the consts
in a class
at runtime?
I have a static class full of consts similar to this:
public static class Constants {
public const string Yes = "Yes";
public const string No = "No";
}
and I was wondering if I could create a UnitTest that could take the Constants class, and read all of the consts from within it. The idea being, I could write one unit test, that is then run against all of the const strings. So if I add more string to the class, the unit test does not have to change.
I believe the answer here is no... but thought it was worth asking just in case!