Is it possible to make an enum using just numbers in C#? In my program I have a variable, Gain, that can only be set to 1, 2, 4, and 8. I am using a propertygrid control to
private enum GainValues { One = 1, Two = 2, Four = 4, Eight = 8 }
should work.
Update: OK, I think I misunderstood you there.
Maybe you could use a KeyValuePair and then bind the name and the value to the Key and Value property respectively.
KeyValuePair