I'm currently trying to create a dictionnary that looks like this :
Dim dict As New Dictionary(Of Integer, Action)
dict.Add(1, MySubFunction1)
dict.Add(2, MySubFunction2)
Public Sub MySubFunction1()
'do something, return nothing'
End Sub
Public Sub MySubFunction2()
'do something, return nothing'
End Sub
Problem is, I cannot use Action with sub function like i saw in c#. Shoud i replace "Sub" by "Function" and always return something, like this :
Public Function MySubFunction1()
'do something'
Return True
End Function
Public Function MySubFunction2()
'do something'
Return True
End Function
Or is there any better way ?