System.Data.DataColumn.MaxLength Property

Gets or sets the maximum length of a text column.

Syntax

[System.ComponentModel.DefaultValue(-1)]
public int MaxLength { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The DataColumn.MaxLength property is ignored for non-text columns. A ArgumentException exception is raised if you assign DataColumn.MaxLength to a non-string column.

Requirements

Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0