accessing an enum from a separate class..
Posted on 2003-11-13
OK.. This should be pretty straight forward, but I am having problems.
I have a class something like this
public class BLLLayer
public enum Temperature: int
//more class stuff...
I want to be able to access the Temperature enum from another class as follows:
public class mytestclass
BLLLayer bll = new BLLLayer();
int i = bll.Temperature.cold;
Console.WriteLine ("value is: " + i);
For whatever reason, I can't access my enum from the BLLLayer class.... Do I need accessor methods ?? What would they look like ?