DataTableMappingCollection Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the DataTableMappingCollection class. This new instance is empty, that is, it does not yet contain any DataTableMapping objects.
public:
DataTableMappingCollection();
public DataTableMappingCollection ();
Public Sub New ()
Examples
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);
}
Public Sub CreateTableMappings()
Dim mappings As New DataTableMappingCollection()
mappings.Add("Categories", "DataCategories")
mappings.Add("Orders", "DataOrders")
mappings.Add("Products", "DataProducts")
Dim message As String = "TableMappings:" & ControlChars.Cr
Dim i As Integer
For i = 0 To mappings.Count - 1
message &= i.ToString() & " " + mappings(i).ToString() _
& ControlChars.Cr
Next i
Console.WriteLine(message)
End Sub
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.