title: How can I create an enum using numbers?
body: <p>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 display and set this value. If I were to create an enum like this...</p>
  
  <pre><code> private enum GainValues {One, Two, Four, Eight}
  </code></pre>
  
  <p>and I made my gain variable of type GainValues then the drop-down list in the propertygrid would only show the available values for the gain variable. The problem is I want the gain values to read numerically an not as words. But I can not create an enum like this:</p>
  
  <pre><code> private enum GainValues {1,2,4,8}
  </code></pre>
  
  <p>So is there another way of doing this? Perhaps creating a custom type?</p>