This article describes the implementation method of C# asynchronous delegate call. Share it for your reference. The details are as follows:
static void Main(string[] args) { //Delegate asynchronous Action<string> showMessage = ShowMessage; IAsyncResult result = ("Test asynchronous delegation",null, null); //The main thread will be blocked before the asynchronous thread finishes work //The main thread can only continue to work until the asynchronous thread is finished (result); (); } static void ShowMessage(string x) { string current = ("Current threadidfor{0}",); (1000); (("{0},输入for{1}", current, x)); }
I hope this article will be helpful to everyone's C# programming.