When reading the 21.9 Other Asynchronous Programming Patterns in the "C# Illustrated Tutorial" 5th edition, an error message was encountered when using the BeginInvoke
function as shown in the example code:
Unhandled exception. System.PlatformNotSupportedException: Operation is not supported on this platform.
After consulting the documentation, starting from .NET Framework 4, the Task Parallel Library provides a new model for asynchronous and parallel programming, namely the Task-based Asynchronous Pattern (TAP). On the latest .NET platform, the BeginInvoke
and EndInvoke
functions are no longer supported. This is noted for reference.
References: