Say I have a function
public void SendMessage(Message message) {
Can I create a delegate for this function? If so, how do I pass the message when I use the delegate?
In my case, this function is used by Thread. Whenever there is an event, I need to send a message to the server to save the record. I also need it to run in the background so that it does not affect the application. However, you must use a delegate for streaming
Thread t = new Thread(new ThreadStart(SendMessage));
and I donβt know how to pass the message to the delegate. Thanks.
source share