Aerospike LINDPad Driver

Helpers..::..CastToNativeType Method (String, Type, String, Object)

Based on fldType, creates a .Net Native (int, decimal, string, datetime, etc.) instance based on binValue.

Namespace:  Aerospike.Database.LINQPadDriver
Assembly:  Aerospike.Database.LINQPadDriver (in Aerospike.Database.LINQPadDriver.dll)

Syntax


public static Object CastToNativeType(
	string fldName,
	Type fldType,
	string binName,
	Object binValue
)

Parameters

fldName
Type: String
Used mostly for detailed exception messages in case of errors.
fldType
Type: Type
Used to create an instance of this type.
binName
Type: String
Used mostly for detailed exception messages in case of errors.
binValue
Type: Object
The bin value used to create fldType. This value maybe returned, if the types match.

Return Value

An instance of fldType or just binValue depending if their types match.