Hi. Let's say I have a function
public void SendMessage(Message message)
{
// perform send message action
}
Can I create a delegate for this kind of function? If so, how can I pass a message when I use the delegate?
In my case, the function is used by Thread. Whenever there is an event, I need to send a message to the server, to keep the record. I also need to keep it running in background, so that it won't affect the application. However, the threading needs to use delegate
Thread t = new Thread(new ThreadStart(SendMessage));
and I don't know how to pass the message into the delegate. Thanks.