Hi All,
I have a Class named "Constants" that contains all the "constant" variable in my application (mostly Strings).
The Class is written like so:
public class Constants
{
public const string DATABASE="myDatabase";
public const string whatever="whatever";
public enum Colors
{
Red
Blue
Orange
}
public const string Time = "07/03/2009 9:14 PM";
}
The members of this Class can be accessed normally by other classes.
The weird thing is, if I remove the "const", that variable can no longer be accessed on other classes.
public class Constants
{
public const string DATABASE="myDatabase";
public const string whatever="whatever";
public enum Colors
{
Red
Blue
Orange
}
public string Time = DateTime.Now.ToString(); //NO LONGER CONST
}
I tried to CLEAN the solution and rebuilding. I also closed/re-run VS2005. Is this a known bug? Or am I missing something else?
Thanks!