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.7.0.0 (5.7.0)
Syntax public static Object ConvertValueToEnum(
Type enumType,
Object sourceValue
)
Public Shared Function ConvertValueToEnum (
enumType As Type,
sourceValue As Object
) As Object
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:
ObjectSee Also