Click or drag to resize

FieldUtilitiesConvertValueToEnum Method

Converts the value in sourceValue to an instance of the specified enum type. Assumes sourceValue isn't null / DBNull.Value and enumType is an enumType. If sourceValue is a string, Enum.Parse() will be used, otherwise Enum.ToObject()

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.5.0.0 (5.5.18.1019)
Syntax
public static Object ConvertValueToEnum(
	Type enumType,
	Object sourceValue
)

Parameters

enumType
Type: SystemType
the Enum type to create an instance of
sourceValue
Type: SystemObject
the value to create an Enum instance of.

Return Value

Type: Object
See Also