Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: TypeCode GetTypeCode(object)

Declaration

public static TypeCode GetTypeCode(
    object value
)

Summary

Crutches needed all around... TypeCode.Empty is described as the type code for "a null reference". Unfortunately the only way to retrieve a TypeCode is from a Type object, which can't represent the type of a null reference (well... actually one can't really talk about a _type_ of a _null_ reference in C# at all as far as I understand). Well anyway, wrapping up the rant, this function fills in the spot of a function that's clearly missing: Type.GetTypeCode(object), which returns TypeCode.Empty if asked to get the type of a null object. Something at the back of my mind tells me that there's one way of looking at this where the behaviour of the existing API would make sense... but really, I think this is how it really should have been since it is a lot more useful.