Redigera

Dela via


_Type.GetInterface Method

Definition

Provides COM objects with version-independent access to the GetInterface method.

Overloads

GetInterface(String)

Provides COM objects with version-independent access to the GetInterface(String) method.

GetInterface(String, Boolean)

Provides COM objects with version-independent access to the GetInterface(String, Boolean) method.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetInterface method gets a specific interface implemented or inherited by the current Type.

GetInterface(String)

Provides COM objects with version-independent access to the GetInterface(String) method.

public:
 Type ^ GetInterface(System::String ^ name);
public Type GetInterface (string name);
abstract member GetInterface : string -> Type
Public Function GetInterface (name As String) As Type

Parameters

name
String

The String containing the name of the interface to get. For generic interfaces, this is the mangled name.

Returns

A Type object representing the interface with the specified name, implemented or inherited by the current Type, if found; otherwise, null.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetInterface method searches for the interface with the specified name.

Applies to

GetInterface(String, Boolean)

Provides COM objects with version-independent access to the GetInterface(String, Boolean) method.

public:
 Type ^ GetInterface(System::String ^ name, bool ignoreCase);
public Type GetInterface (string name, bool ignoreCase);
abstract member GetInterface : string * bool -> Type
Public Function GetInterface (name As String, ignoreCase As Boolean) As Type

Parameters

name
String

The String containing the name of the interface to get. For generic interfaces, this is the mangled name.

ignoreCase
Boolean

true to perform a case-insensitive search for name.

-or-

false to perform a case-sensitive search for name.

Returns

A Type object representing the interface with the specified name, implemented or inherited by the current Type, if found; otherwise, null.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetInterface method searches for the specified interface, specifying whether to do a case-sensitive search.

Applies to