I need to make an enum with one of the values = 50/50
Is this not possible? Visual Studio doesn’t seem to like it.
I may have to make this field a database lookup it seems.
Please let me know.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
C# enumerations compile out as sealed classes, inheriting from Enum, with public static fields carrying the name of your enumeration members, thus, you’re asking the compiler to name fields the enum values or 50/50 in your case.
Enumeration values carry the same restrictions as properties and fields when it comes to naming.