|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
DataColumn, classe
Espace de noms : System.Data
Assembly : System.Data (dans System.Data.dll)
Le type DataColumn expose les membres suivants.
| Nom | Description | |
|---|---|---|
![]() ![]() | DataColumn() | |
![]() ![]() | DataColumn(String) | |
![]() ![]() | DataColumn(String, Type) | |
![]() ![]() | DataColumn(String, Type, String) | |
![]() ![]() | DataColumn(String, Type, String, MappingType) |
| Nom | Description | |
|---|---|---|
![]() ![]() | AllowDBNull | |
![]() ![]() | AutoIncrement | |
![]() ![]() | AutoIncrementSeed | |
![]() ![]() | AutoIncrementStep | |
![]() ![]() | Caption | |
![]() ![]() | ColumnMapping | |
![]() ![]() | ColumnName | |
![]() ![]() | Container | |
![]() ![]() | DataType | |
![]() ![]() | DateTimeMode | |
![]() ![]() | DefaultValue | |
![]() ![]() | DesignMode | |
![]() ![]() | Events | |
![]() ![]() | Expression | |
![]() ![]() | ExtendedProperties | |
![]() ![]() | MaxLength | |
![]() ![]() | Namespace | |
![]() ![]() | Ordinal | |
![]() ![]() | Prefix | |
![]() ![]() | ReadOnly | |
![]() ![]() | Site | |
![]() ![]() | Table | |
![]() ![]() | Unique |
| Nom | Description | |
|---|---|---|
![]() ![]() | CheckNotAllowNull | Infrastructure. |
![]() ![]() | CheckUnique | Infrastructure. |
![]() ![]() | Dispose() | |
![]() ![]() | Dispose(Boolean) | |
![]() ![]() | Equals(Object) | |
![]() ![]() | Finalize | |
![]() ![]() | GetHashCode | |
![]() ![]() | GetService | |
![]() ![]() | GetType | |
![]() ![]() | MemberwiseClone | |
![]() ![]() | OnPropertyChanging | |
![]() ![]() | RaisePropertyChanging | |
![]() ![]() | SetOrdinal | |
![]() ![]() | ToString |
| Nom | Description | |
|---|---|---|
![]() ![]() | Disposed |
private void MakeTable() { // Create a DataTable. DataTable table = new DataTable("Product"); // Create a DataColumn and set various properties. DataColumn column = new DataColumn(); column.DataType = System.Type.GetType("System.Decimal"); column.AllowDBNull = false; column.Caption = "Price"; column.ColumnName = "Price"; column.DefaultValue = 25; // Add the column to the table. table.Columns.Add(column); // Add 10 rows and set values. DataRow row; for(int i = 0; i < 10; i++) { row = table.NewRow(); row["Price"] = i + 1; // Be sure to add the new row to the // DataRowCollection. table.Rows.Add(row); } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
