Knight Chat X
Member
The problem I have is I need to be able to pass the address of a method from another sub or function in a class.
The function below does not work as I cant declare as a method, "MyMethod" is a method elsewhere in the program which processes messages.
Public Function CreateListeningSocketThreadAndStartMessageProcessing(ByVal MyMethod As Method) As TcpListener
CreateListeningSocketThreadAndStartMessageProcessing = New Threading.Thread(AddressOf MyMethod) THIS DOES NOT WORK...
CreateListeningSocketThreadAndStartMessageProcessing.Start()
End Function
Is there solution?
The function below does not work as I cant declare as a method, "MyMethod" is a method elsewhere in the program which processes messages.
Public Function CreateListeningSocketThreadAndStartMessageProcessing(ByVal MyMethod As Method) As TcpListener
CreateListeningSocketThreadAndStartMessageProcessing = New Threading.Thread(AddressOf MyMethod) THIS DOES NOT WORK...
CreateListeningSocketThreadAndStartMessageProcessing.Start()
End Function
Is there solution?