假设我有:
Public Class clsTest
Public Sub New()
End Sub
Public Sub New(name_ As String)
'...
End Sub
End Class
我想扩展这个类:
<System.Runtime.CompilerServices.Extension> _
Public Sub methodA(t1 As clsTest, i As Integer)
'...
End Sub
但我不能将构造函数扩展为:
<System.Runtime.CompilerServices.Extension> _
Public Sub New(t1 As clsTest, name_ As String, i As Integer)
'...
End Sub