DataTableMappingCollection Constructor
.NET Framework 4.5
Initializes a new instance of the DataTableMappingCollection class. This new instance is empty, that is, it does not yet contain any DataTableMapping objects.
Namespace: System.Data.Common
Assembly: System.Data (in System.Data.dll)
The following example creates a DataTableMappingCollection, adds DataTableMapping objects to the collection, and displays a list of the mapped source tables.
public void CreateTableMappings() { DataTableMappingCollection mappings = new DataTableMappingCollection(); mappings.Add("Categories","DataCategories"); mappings.Add("Orders","DataOrders"); mappings.Add("Products","DataProducts"); string message = "TableMappings:\n"; for(int i=0;i < mappings.Count;i++) { message += i.ToString() + " " + mappings[i].ToString() + "\n"; } Console.WriteLine(message); }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.