Type.GetEnumValues Method
Updated: August 2011
Returns an array of the values of the constants in the current enumeration type.
Assembly: mscorlib (in mscorlib.dll)
| Exception | Condition |
|---|---|
| ArgumentException |
The current type is not an enumeration. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
The result is not values of the enumeration's underlying type
This method returns the same data as Type.GetEnumNames() when called on enumeration type! I guess the result should be values of the underlying type as stated.
Edit: I was wrong. The return Array contains enumeration's values which should be cast to base type.