System.Data.DataTableCollection.Add C# (CSharp) Méthode

Add() public méthode

Creates a new table with a default name and adds it to the collection.
public Add ( ) : DataTable
Résultat DataTable
        public DataTable Add()
        {
            DataTable table = new DataTable();
            Add(table);
            return table;
        }

Same methods

DataTableCollection::Add ( string name ) : DataTable
DataTableCollection::Add ( string name, string tableNamespace ) : DataTable
DataTableCollection::Add ( DataTable table ) : void

Usage Example

		public void WriteXmlSchema (XmlWriter writer)
		{
			DataSet ds = DataSet;
			DataSet tmp = null;
			try {
				if (ds == null) {
					tmp = ds = new DataSet ();
					ds.Tables.Add (this);
				}
				DataTableCollection col = new DataTableCollection (ds);
				col.Add (this);
				XmlSchemaWriter.WriteXmlSchema (ds, writer, col, null);
			} finally {
				if (tmp != null)
					ds.Tables.Remove (this);
			}
		}
All Usage Examples Of System.Data.DataTableCollection::Add