The maximum acceptable length of the PIN.

Namespace: CardWerk.SmartCard
Assembly: CardWerk.SmartCard (in CardWerk.SmartCard.dll)

Public Property MaxLength() As Integer
This language is not supported or no code example is available.
public int MaxLength {get; set;}
This language is not supported or no code example is available.
public:  
property int MaxLength { 
int get( ); 
void set( 
int value 
); 
}
This language is not supported or no code example is available.
public function get MaxLength() : int
public function set MaxLength(value : int);
This language is not supported or no code example is available.

Property Value

Type: int

By default the maximum acceptable length of the PIN is derived from the encoding and the command template. If the maximum length is set to a value smaller than the minimum length, then the minimum length is set equal to the maximum length. The maximum length cannot be set to a negative value, and cannot be set to zero. If the selected PIN encoding is Format2PinBlock , then the maximum PIN length cannot be less than four or more than twelve. An attempt to set a value outside the required range for a Format2PinBlock will cause an ArgumentOutOfRangeException to be thrown. Input devices or dialogs may or may not implicitly honor this requirement.

Exception type Condition

ArgumentOutOfRangeException

Thrown when one or more arguments are outside the required range.

.NET Framework

Supported in: 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

.NET Core

Supported in: 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0

.NET Standard

Supported in: 2.0