このクラスで (直接または間接的に) 実装されていて、完全限定名が指定したインターフェイス名と一致するインターフェイスを返します。
Overrides Overloads Public Function GetInterface( _
ByVal name As String, _ ByVal ignoreCase As Boolean _) As Type
[C#]
public override Type GetInterface(stringname,boolignoreCase);
[C++]
public: Type* GetInterface(String* name,boolignoreCase);
[JScript]
public override function GetInterface(
name : String,ignoreCase : Boolean) : Type;
パラメータ
- name
インターフェイスの名前。 - ignoreCase
true の場合は、検索で大文字小文字が区別されません。 false の場合は、検索で大文字小文字が区別されます。
戻り値
実装されているインターフェイスを表す Type オブジェクトを返します。一致する名前のインターフェイスが見つからない場合は null を返します。
例外
例外の種類 | 条件 |
---|---|
NotSupportedException | このメソッドは現在、不完全な型に対してはサポートされていません。 |
解説
終了型のインターフェイスを取得する代替手段としては、 Type.GetType または Assembly.GetType を使用して型を取得し、取得した型に対してリフレクションを使用します。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
EnumBuilder クラス | EnumBuilder メンバ | System.Reflection.Emit 名前空間 | EnumBuilder.GetInterface オーバーロードの一覧