Queries an interface on the object.

Namespace: BlueCieloECM.InnoCielo.Meridian
Assembly: BlueCieloECM.InnoCielo.Meridian (in BlueCieloECM.InnoCielo.Meridian.dll) Version: 1.4.0.0 (1.4.40.0)

Syntax

C#
public static T QueryInterface<T>(
	Object anObject,
	bool throwIfNotSupported
)
where T : class
Visual Basic
Public Shared Function QueryInterface(Of T As Class) ( _
	anObject As Object, _
	throwIfNotSupported As Boolean _
) As T
Visual C++
public:
generic<typename T>
where T : ref class
static T QueryInterface(
	Object^ anObject, 
	bool throwIfNotSupported
)

Parameters

anObject
Type: System..::..Object
The object to query the interface on.
throwIfNotSupported
Type: System..::..Boolean
A value indicating whether the NotSupportedException exception should be thrown if the object does not support the interface.

Type Parameters

T
The interface to query.

Return Value

The object casted to the interface. Or nullNothingnullptra null reference (Nothing in Visual Basic) if the interface is not supported by the object and throwIfNotSupported is falseFalsefalsefalse (False in Visual Basic).

See Also