TypeBuilder.GetInterface(String, Boolean) 方法

定義

傳回此類別所 (直接或間接) 實作的介面,且完整格式名稱符合指定的介面名稱。

public:
 override Type ^ GetInterface(System::String ^ name, bool ignoreCase);
public override Type? GetInterface (string name, bool ignoreCase);
public override Type GetInterface (string name, bool ignoreCase);
override this.GetInterface : string * bool -> Type
Public Overrides Function GetInterface (name As String, ignoreCase As Boolean) As Type

參數

name
String

介面的名稱。

ignoreCase
Boolean

如果為 true,搜尋不區分大小寫。 如果為 false,搜尋會區分大小寫。

傳回

Type

傳回 Type 物件,代表所實作的介面。 如果找不到符合名稱的介面,便傳回 null。

例外狀況

不會為不完整的類型實作此方法。

備註

使用或抓取型 Type.GetTypeAssembly.GetType ,然後在抓取的型別上使用反映。

適用於