Releases all resources used by the current instance of the Task class.
Assembly: mscorlib (in mscorlib.dll)
The Task class implements the IDisposable interface because internally it uses resources that also implement IDisposable. However, particularly if your app targets the .NET Framework 4.5 or later, there is no need to call Dispose unless performance or scalability testing indicates that, based on your usage patterns, your app's performance would be improved by disposing of tasks. For more information, see Do I need to dispose of Tasks? in the Parallel Programming with .NET blog.