EnumExtensions..::..EnumToDictionary Method

Converts Enumeration type into a dictionary of names and values var dictionary = typeof(UriFormat).EnumToDictionary();

Namespace:  Core
Assembly:  Core (in Core.dll)

Syntax


public static IDictionary<string, int> EnumToDictionary(
	Type t
)

Parameters

t
Type: Type
Enum type

Return Value

IDictionary<System.String, System.Int32>.

Exceptions


ExceptionCondition
NullReferenceException
InvalidCastExceptionobject is not an Enumeration