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.11.0.0 (5.11.23.1114)
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