I have the following code:
class EmployeeFactory { public enum EmployeeType { ManagerType, ProgrammerType, DBAType } }
I want to access this class MAIN (Program). I wrote the following code. IT IS WORKING. But I want to know how I can access ENUM without instantiating the class. Do ENUM tools look like a static variable (class level variable)? Any help?
class Program { static void Main(string[] args) { Console.WriteLine(EmployeeFactory.EmployeeType.ProgrammerType);
or do i need to write it that way?
EmployeeFactory ef = new EmployeeFactory(); ef.EmployeeType.ProgrammerType
source share