CodeMemberMethod.ImplementationTypes 屬性

定義

取得這個方法所實作的介面的資料型別,除非它是 PrivateImplementationType 屬性所指示的私用 (Private) 方法實作。Gets the data types of the interfaces implemented by this method, unless it is a private method implementation, which is indicated by the PrivateImplementationType property.

public:
 property System::CodeDom::CodeTypeReferenceCollection ^ ImplementationTypes { System::CodeDom::CodeTypeReferenceCollection ^ get(); };
public System.CodeDom.CodeTypeReferenceCollection ImplementationTypes { get; }
member this.ImplementationTypes : System.CodeDom.CodeTypeReferenceCollection
Public ReadOnly Property ImplementationTypes As CodeTypeReferenceCollection

屬性值

CodeTypeReferenceCollection,表示這個方法所實作的介面。A CodeTypeReferenceCollection that indicates the interfaces implemented by this method.

備註

這個集合所參考的類型必須包含介面。The types referenced by this collection must consist of interfaces.

如果這CodeMemberMethod代表公用方法的宣告,而這個方法會在介面上執行方法,則這個方法會實作為方法的介面或介面,應在此集合中參考。If this CodeMemberMethod represents a declaration for a public method, and this method implements a method on an interface, the interface or interfaces this method implements a method of should be referenced in this collection.

方法的名稱應該與這個方法所實作為介面的方法相同。The method should still have the same name as the method of the interface that is implemented by this method. 對於某些語言(例如C#),這不會影響語法。For some languages, like C#, this has no effect on the syntax. 對於其他人(例如 Visual Basic),有一個特殊的語法可用於執行介面。For others, like Visual Basic, there is a special syntax for implementing interfaces. 如果方法是私下執行單一介面,則PrivateImplementationType應該改用屬性。If the method is privately implementing a single interface, the PrivateImplementationType property should be used instead.

適用於