Language

TaskRetryPolicy.MaxAttempts Property

Definition

The maximum number of attempts, including the first. Defaults to 3. Must be between 1 and the hard cap of 10; a larger or non-positive value throws ArgumentOutOfRangeException. Set to 1 to disable retries.

public int MaxAttempts { get; init; }
member this.MaxAttempts : int with get, set
Public Property MaxAttempts As Integer

Property Value

Applies to