Click or drag to resize

GeneralUtilsConvertValueToRealNullIfRequired Method

Converts the value passed in to null/Nothing (reference type) or default value (value type) if the value is DbNull.Value, based on the type passed in, also if that type is a nullable type.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.10.0.0 (5.10.0)
Syntax
public static Object ConvertValueToRealNullIfRequired(
	Object rawValue,
	Type destinationType
)

Parameters

rawValue
Type: SystemObject
The plain value.
destinationType
Type: SystemType
Type of the destination.

Return Value

Type: Object
rawValue if rawValue isn't null/DBNull.Value, otherwise null, if destinationType is reference type, otherwise the default for the value type
See Also