Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

Enum

$
0
0

 How would one rewrite the Enum.GetNames(typeof(MyEnumType)) syntax to .net cobol.  I am trying to populate my combobox with an enum and I cannot figure out the syntax for the GetNames().

  1. publicenum MyEnumType
  2. {
  3. Sunday=0,
  4. Monday=1,
  5. Tuesday=2,
  6. Wednesday=3,
  7. Thursday=4,
  8. Friday=5,
  9. Saturday=6,
  10. }
  11.  
  12. // In the form Load event, bind the combobox to the data source.
  13. privatevoid Form1_Load(object sender, EventArgs e)
  14. {
  15.  
  16.  
  17. comboBox2.DataSource=Enum.GetValues(typeof(MyEnumType));
  18. comboBox2.SelectedItem= MyEnumType.Friday;

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>