这似乎有效,看看这是不是你的想法......
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim f As New List(Of Func(Of Double, Double))
f.Add(AddressOf fTest)
f.Add(AddressOf fTest)
f.Add(AddressOf fTest)
Dim b As Boolean = Equilibrium(f.ToArray)
End Sub
Public Function fTest(value As Double) As Double
Return Math.PI * value
End Function
Public Function Equilibrium(ParamArray F() As Func(Of Double, Double)) As Boolean
Dim input As Double = 2.38
Dim G As Func(Of Double, Double) =
Function(v As Double) As Double
Return (From fItem As Func(Of Double, Double) In F
Select fItem(v)).Sum
End Function
Dim sum As Double = G(input)
' ...
End Function