Asynchronous Web Services
One specific area in which you'll want to use asynchronous WinForms applications is when calling Web services. Calling a Web service is similar to passing a message between threads, except that Web services messages travel between machines using standard protocols such as HTTP and XML.[4] Imagine a .NET Web service that calculated digits of pi using some way-cool fast pi calculation engine:
[4] For thorough coverage of the whys and wherefores of Web services, you can read .NET Web Services: Architecture and Implementation with .NET (Addison-Wesley, 2003), by Keith Ballinger.
public class CalcPiService : System.Web.Services.WebService { [WebMethod] public string CalcPi(int digits) { StringBuilder pi = new StringBuilder("3", ...
Get Windows Forms Programming in C# now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.