'Declaration Public Shared Function IsContextOfType( _ ByVal context As Object, _ ByVal typeToCheck As Type _ ) As Boolean
public static bool IsContextOfType( object context, Type typeToCheck )
The method returns the following:
If either parameter is null it returns false.
If the context type is equal to the passed in type or if it is a subclass of the type the method returns true.
If the passed in type is an interface and if the object implements the interface then true is returned. Otherwise, false is returned.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2