System.Task API Reference
This page provides a comprehensive overview of the System.Task namespace.
Overview
The System.Task namespace is a collection of classes and methods that enable you to create and manage tasks within the .NET Framework. These tasks can be triggered by various events and can perform a wide range of operations.
Key Classes
Here are some key classes you'll likely use:
- System.Task: The base class for all tasks.
- Task<: Represents a specific task.
- Task<.Run: Executes a task.
- Task<.Delay: Creates a task that will wait for a specified duration.
- Task<.Continue: Resumes an unfinished task.
- Task<.Stop: Stops an unfinished task.
- Task<.Abort: Aborts an unfinished task.
- Task<.Create: Creates a new task.
Task Methods
Here are some common methods:
- Get<: Retrieves the current task.
- Set<: Sets the task's state.
- Continue<: Starts a task.
- Stop<: Stops a task.
- Abort<: Aborts a task.
- Dequeue<: Removes the next task from the queue.
Example - Task Creation
Let's create a simple task.
Task<.Create< {
This is a new task.
}