Dim gcAction As Action = Sub()
GC.Collect()
GC.WaitForPendingFinalizers()
End Sub
'----------------------------
Dim ac As New Action(Sub()
GC.Collect()
GC.WaitForPendingFinalizers()
End Sub)
ac()
'--------------------------
Array.ForEach(New String() {"xx", "mm", "-r"}, action)
Dim action As New Action(Of String)(AddressOf DPrintString)
Private Sub DPrintString(s As String)
Debug.Print(s)
End Sub
Action 是系统自带的 一个方法,该方法只采用一个参数并且不返回值。