PROPERTY

Task.IsCompletedSuccessfully

Reports successful terminal completion only. It is false for pending, canceled and faulted tasks. Reading the property does not observe an exception or wait for completion.

Formal Syntax & Structure

csharp syntaxcsharp
task.IsCompletedSuccessfully

Working Example

Example Snippetcsharp
using System;using System.Threading;using System.Threading.Tasks;Console.WriteLine(Task.CompletedTask.IsCompletedSuccessfully); // True
C# & .NET Reference