C
csharpula csharp
Hello ,
I have 2 questions about enums:
1) How can I recognize defined enum in other projects ,do I have to add
the full namespace path before it such as:
Projects.New Project.Test.MessageType (MessageType is an enum) - each
time I use it or I can somehow do it with using in the head of the file?
2) How can I validate if I got a valid enum value? Is it possible this
way:
if (System.Enum.IsDefined(typeof(MessageType), msgType) == false)
Is it ok?
Thank u!
I have 2 questions about enums:
1) How can I recognize defined enum in other projects ,do I have to add
the full namespace path before it such as:
Projects.New Project.Test.MessageType (MessageType is an enum) - each
time I use it or I can somehow do it with using in the head of the file?
2) How can I validate if I got a valid enum value? Is it possible this
way:
if (System.Enum.IsDefined(typeof(MessageType), msgType) == false)
Is it ok?
Thank u!