DataColumn.AutoIncrementSeed Property
.NET Framework 2.0
Gets or sets the starting value for a column that has its AutoIncrement property set to true.
Namespace: System.Data
Assembly: System.Data (in system.data.dll)
Assembly: System.Data (in system.data.dll)
The following example sets the AutoIncrement, AutoIncrementSeed, and AutoIncrementStep properties.
private void AddAutoIncrementColumn() { DataColumn column = new DataColumn(); column.DataType = System.Type.GetType("System.Int32"); column.AutoIncrement = true; column.AutoIncrementSeed = 1000; column.AutoIncrementStep = 10; // Add the column to a new DataTable. DataTable table = new DataTable("table"); table.Columns.Add(column);
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.