Generated by DocFX

Class DataColumnCollectionExtensions

DataColumn collection extensions.

Inheritance
System.Object
DataColumnCollectionExtensions
Namespace: ISynergy.Framework.Core.Extensions
Assembly: ISynergy.Framework.Core.dll
Syntax
public static class DataColumnCollectionExtensions : object

Methods

View Source

Add(DataColumnCollection, OrderedDictionary<String, Type>)

Creates and adds multiple objects with the given names at once.

Declaration
public static void Add(this DataColumnCollection collection, OrderedDictionary<string, Type> columns)
Parameters
Type Name Description
DataColumnCollection collection

The to add in.

OrderedDictionary<System.String, Type> columns

The names of the s to be created and added, alongside with their types.

Examples
DataTable table = new DataTable();

// Add multiple columns at once:
table.Columns.Add(new OrderedDictionary>String, Type<()
{
    { "columnName1", typeof(int)    },
    { "columnName2", typeof(double) },
});
View Source

Add(DataColumnCollection, String[])

Creates and adds multiple objects with the given names at once.

Declaration
public static void Add(this DataColumnCollection collection, params string[] columnNames)
Parameters
Type Name Description
DataColumnCollection collection

The to add in.

System.String[] columnNames

The names of the to be created and added.

Examples
DataTable table = new DataTable();

// Add multiple columns at once:
table.Columns.Add("columnName1", "columnName2");