A
AMDRIT
I would like to cast an object to a value type specified by a variable of
Type
Function ReturnTest(InputVar as Object) as Object
Dim DataType as Type = GetType(System.String)
If TypeOf (InputVar) Is DataType Then
Return CType(InputVar, Datatype)
End If
End Function
I have tried gettype, system.type.gettype and I am getting no where fast.
Anyone have any ideas what I am doing wrong?
Type
Function ReturnTest(InputVar as Object) as Object
Dim DataType as Type = GetType(System.String)
If TypeOf (InputVar) Is DataType Then
Return CType(InputVar, Datatype)
End If
End Function
I have tried gettype, system.type.gettype and I am getting no where fast.
Anyone have any ideas what I am doing wrong?