Code to Check object is Value type or not?

Virendradugar
Posted by Virendradugar under VB.NET category on | Views : 3355
Below given Shared function will check whether object is value type or not?

Public Shared Function CheckType(ByVal objType As Object) As Boolean
Return (TypeOf (objType) Is System.ValueType)
End Function


It returns true, if object is value type, else false.

Thanks,
Virendra Dugar

Comments or Responses

Login to post response