<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.2" />

LongValidatorAttribute

Declaratively instructs .NET to perform long-integer validation on a configuration property. This class cannot be inherited.
public bool ExcludeRange { get; set; }

Gets or sets a value that indicates whether to include or exclude the integers in the range defined by the MinValue and MaxValue property values.

public long MaxValue { get; set; }

Gets or sets the maximum value allowed for the property.

public long MinValue { get; set; }

Gets or sets the minimum value allowed for the property.

Initializes a new instance of the LongValidatorAttribute class.