TaskRetryPolicy.MaxAttempts Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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