Skip to main content
deleted 4 characters in body
Source Link
Hinek
  • 9.8k
  • 12
  • 56
  • 77

Sometimes you have an object to the MyEnum type. Like

var MyEnumType = typeof(MyEnumTypeMyEnum);

Then:

Enum.ToObject(typeof(MyEnum), 3)

Sometimes you have an object to the MyEnum type. Like

var MyEnumType = typeof(MyEnumType);

Then:

Enum.ToObject(typeof(MyEnum), 3)

Sometimes you have an object to the MyEnum type. Like

var MyEnumType = typeof(MyEnum);

Then:

Enum.ToObject(typeof(MyEnum), 3)
added 3 characters in body
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

Sometimes you have andan object to the MyEnumMyEnum type. Like

var MyEnumType = typeof(MyEnumType);

thenThen:

Enum.ToObject(typeof(MyEnum), 3)

Sometimes you have and object to the MyEnum type. Like

var MyEnumType = typeof(MyEnumType);

then:

Enum.ToObject(typeof(MyEnum), 3)

Sometimes you have an object to the MyEnum type. Like

var MyEnumType = typeof(MyEnumType);

Then:

Enum.ToObject(typeof(MyEnum), 3)
Source Link
L. D.
  • 589
  • 4
  • 3

Sometimes you have and object to the MyEnum type. Like

var MyEnumType = typeof(MyEnumType);

then:

Enum.ToObject(typeof(MyEnum), 3)