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().
- public enum MyEnumType
 
- 
{
 
- 
Sunday=0,
 
- 
Monday=1,
 
- 
Tuesday=2,
 
- 
Wednesday=3,
 
- 
Thursday=4,
 
- 
Friday=5,
 
- 
Saturday=6,
 
- 
}
 
- 
 
 
- 
// In the form Load event, bind the combobox to the data source.
 
- 
private void Form1_Load(object sender, EventArgs e)
 
- 
{
 
- 
 
 
- 
 
 
- 
comboBox2.
DataSource = Enum.
GetValues(typeof(MyEnumType
));
 
 
- 
comboBox2.SelectedItem = MyEnumType.Friday;
 
This should be more or less:
       enum-id MyEnumType.
       78 Sunday value 0.
       78 Monday value 1.
       78 Tuesday value 2.
       78 Wednesday value 3.
       78 Thursday value 4.
       78 Friday value 5.
       78 Saturday value 6.
       end enum.
       class-id a.
       method-id Form1_Load(sender as object, e as type EventArgs).
           set comboBox2::DataSource to type Enum::GetValues(type of MyEnumType)
           set comboBox2::SelectedItem to type MyEnumType::Friday
       end method.
       end class.
                
     
                                    
             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().
- public enum MyEnumType
 
- 
{
 
- 
Sunday=0,
 
- 
Monday=1,
 
- 
Tuesday=2,
 
- 
Wednesday=3,
 
- 
Thursday=4,
 
- 
Friday=5,
 
- 
Saturday=6,
 
- 
}
 
- 
 
 
- 
// In the form Load event, bind the combobox to the data source.
 
- 
private void Form1_Load(object sender, EventArgs e)
 
- 
{
 
- 
 
 
- 
 
 
- 
comboBox2.
DataSource = Enum.
GetValues(typeof(MyEnumType
));
 
 
- 
comboBox2.SelectedItem = MyEnumType.Friday;
 
Thanks Robert.  I was staring at this way too long and the answer was right in front of me.  I was trying to mimic the C# code by using typeof not realizing I could use type of.