I'm using several classes to store data. Each of these classes has static variables with the same name across classes. I want to load these variables by inputting the name of the class with a string and returning the data from that particular class.
I previously did this by loading an instance of the class via reflection, but I want to do this without actually having to create an instance of the class.
public class dataSet {
static int dataPoint=1;
}
public class otherDataSet {
static int dataPoint=2;
}
public int returnDataPoint (string className) {
//returns className.dataPoint
}