title: Dynamically create an enum
body: <p>I have an enum of the following structure:</p>
  
  <pre><code>public enum DType
  {       
      LMS =  0,
      DNP = -9,
      TSP = -2,
      ONM =  5,
      DLS =  9,
      NDS =  1
  }
  </code></pre>
  
  <p>I'm using this enum to get the names and the values. 
  Since there is a requirement to add more types, I need to read the type and the values from an XML file. Is there any way by which I can create this enum dynamically from <strong>XML</strong> file so that I can retain the program structure.</p>