title: How can I use an enum as a datasource?
body: <p>I would like to use the values in an enum as the source for some comboboxes. This compiles, but doesn't populate the combobox:</p>
  
  <pre><code>private enum ValueType { Text, Barcode }
  
  private ValueType vt;
  
  private void FormCPCLCodeGenUtil_Load(object sender, EventArgs e)
  {
      comboBoxType1.DataSource = vt;
  }
  </code></pre>
  
  <p>...which shouldn't surprise me, as vt hasn't been assigned a value; and I don't want the combobox to just have one value. So how can I do this (or is there a better way than using an enum as the data source)?</p>
  
  <h2>UPDATE</h2>
  
  <p>A side question: which one of these is better, when several comboboxes will use the same data source :</p>
  
  <pre><code>    comboBoxType1.DataSource = Enum.GetNames(typeof(ValueType)); 
      comboBoxFontSize1.DataSource = Enum.GetNames(typeof (FontSizeType));
      comboBoxAlign1.DataSource = Enum.GetNames(typeof(AlignOptions));
  
      //comboBoxType2.DataSource = comboBoxType1.DataSource; 
      comboBoxType2.DataSource = Enum.GetNames(typeof(ValueType));
  </code></pre>
  
  <p>(using the previously assigned comboboxes data source as its own, or connecting in the same way as the previous one?)</p>