VB.net 使用Action
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim test As Action(Of Integer, Integer) = Sub(x, y)
MsgBox(x + y)
End Sub
test.Invoke(10, 20)
test.Invoke(20, 30)
test.Invoke(30, -1)
End Sub
Please follow WeChat's public account ByCAD