For instance... if i have a method that performs some asynchronous operation and i want to notify/call some sort of callback once it's done, would i use delegate?
I can't seem to get my head round how that would work. Can anyone point me in the right direction?
I was looking at something like....
public class ContentContext
{
public delegate void SuccessCallback(Dictionary<String, String> content);
public void DoSomeAsyncOpertaion(SuccessCallback successCallback)
{
//do something and then fire the callback
}
}
But something about that smells funny. Still a beginner with this c# stuff so forgive my ignorance ;)
Cheers J