MainUtil.IsType Method (Type, Type)
Checks if an object is of a given type
[Visual Basic]
Overloads Public Shared Function IsType( _
ByVal
objType As
Type, _
ByVal
ancestorType As
Type _
) As
Boolean
[C#]
public static
bool IsType(
Type objType,
Type ancestorType);
Return Value
True if the object is of the type, otherwise false.
Remarks
This function is analog to the "is" operator.
The function performs the following checks:
- Is the type of object equivalent to the type.
- Is the object a subclass of the type.
- If the type is an interface, does the object implement it.
See Also
MainUtil Class | Sitecore Namespace | MainUtil.IsType Overload List