Main Content
Underlying Enumeration Values
MATLAB® supports enumerations of any numeric type.
To find the underlying type of an enumeration, use the System.Enum
static method GetUnderlyingType
. For example, the following C#
statement in the NetDocEnum
assembly declares the enumeration
Range
:
public enum Range : long {Max = 2147483648L,Min = 255L}
To display the underlying type:
maxValue = NetDocEnum.Range.Max; System.Enum.GetUnderlyingType(maxValue.GetType).FullName
ans = System.Int64