派生クラスの Sub New 内のパラメータの数または型が、ベースクラスの Sub New 内のパラメータのものと異なります。以下に例を示します。
Class Baseclass
Sub New (X As Long)
End Sub
End Class
Class Derivedclass As Baseclass
Sub New (X As Long, Y As Long) ' Illegal, because Y is not a parameter
' in Baseclass's Sub New.
End Sub
End Class
次のいずれかを実行します。
Class Derivedclass As Baseclass
Sub New (X As Long, Y As Long), Baseclass (X)
End Sub
End Class
Class Derivedclass As Baseclass
Sub New (X As Long)
End Sub
End Class