Home > Net >  How to define the enumeration program for short type in it?
How to define the enumeration program for short type in it?

Time:03-25

How to define the enumeration program inside what type? Quote as follows, whether do int or short, we do have a casting, can directly defined as an int or short?

 
Public enum UniDI0: int
{
Safety grating=0,
Magnetic sensors on the collecting plate cylinder=1,
Collecting plate vacuum negative pressure table=2,
}


//or written
 
Public enum UniDI0: short
{
Safety grating=0,
Magnetic sensors on the collecting plate cylinder=1,
Collecting plate vacuum negative pressure table=2,
}
  •  Tags:  
  • C#
  • Related