共用方式為


無法實作符合此簽名碼的成員 '<interfacename>.<procedurename>',因為介面 '<interfacename>' 包含多個成員具有此相同名稱和簽名碼: <signaturelist>

更新:2007 年 11 月

程序或屬性會嘗試實作在實作介面中定義的程序或屬性 (Property),但是編譯器 (Compiler) 找到多個具有相同名稱和簽章的介面程序或屬性版本。

這個錯誤會發生在具有建構之泛型型別的案例中,如下列的基本架構宣告所示。

Public Interface baseInterface(Of t)
    Sub doSomething(ByVal inputValue As String)
    Sub doSomething(ByVal inputValue As t)
End Class
Public Class implementingClass
    Implements baseInterface(Of String)
    Sub doSomething(ByVal inputValue As String) _
        Implements baseInterface(Of String).doSomething
    End Sub
End Class

由於 implementingClass 實作的 baseInterface 會提供 String 給它的型別參數 t,所以就 implementingClass 而言,baseInterface 中的兩個 doSomething 版本都會採用相同的簽章。因此,編譯器無法判斷要實作哪一個版本。

錯誤 ID:BC30937

若要更正這個錯誤

  • 變更您提供給基底類別的型別引數,使它不會導致一或多個與成員程序或屬性相同的簽章。

    -或-

  • 請勿實作這個基底類別。因為您必須實作基底類別的每個成員,所以無法以正在使用的一組型別引數實作它。

請參閱

概念

Implements 關鍵字和 Implements 陳述式

參考

Implements (Visual Basic)

Implements 陳述式