ReflectionUtils.TypeOfOrType Method
Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ReflectionUtils.TypeOfOrType Method

Returns the Type of the supplied source.

[Visual Basic]
Public Shared Sub TypeOfOrType( _
   ByVal source As Object _
public static Type TypeOfOrType(
   object source


A Type or Object instance.

Return Value

The sourceargument if it is a Type or the result of invoking GetType on the argument if it is an Object.


If the source is a Type instance, the return value of this method call with be the source parameter cast to a Type. If the source is anything other than a Type, the return value will be the result of invoking the source's GetType method.


Exception Type Condition
NullReferenceException If the source is a null reference (Nothing in Visual Basic).

See Also

ReflectionUtils Class | Spring.Util Namespace