Intermediate C#
Q51 / 100

What is a CancellationToken?

Correct! Well done.

Incorrect.

The correct answer is B) A mechanism to cooperatively cancel async or long-running operations

B

Correct Answer

A mechanism to cooperatively cancel async or long-running operations

Explanation

Pass CancellationToken to async methods. Check token.IsCancellationRequested or call token.ThrowIfCancellationRequested() at safe points.

Progress
51/100