Export (0) Print
Expand All

DataColumn.MaxLength Property

Gets or sets the maximum length of a text column.

[Visual Basic]
Public Property MaxLength As Integer
[C#]
public int MaxLength {get; set;}
[C++]
public: __property int get_MaxLength();
public: __property void set_MaxLength(int);
[JScript]
public function get MaxLength() : int;
public function set MaxLength(int);

Property Value

The maximum length of the column in characters. If the column has no maximum length, the value is –1 (default).

Remarks

The MaxLength property is ignored for non-text columns.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

DataColumn Class | DataColumn Members | System.Data Namespace

Show:
© 2014 Microsoft