Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
6069 lines (5426 sloc) 418 KB
<
<Type Name="DataSet" FullName="System.Data.DataSet">
<TypeSignature Language="C#" Value="public class DataSet : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitializeNotification, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit DataSet extends System.ComponentModel.MarshalByValueComponent implements class System.ComponentModel.IListSource, class System.ComponentModel.ISupportInitialize, class System.ComponentModel.ISupportInitializeNotification, class System.Runtime.Serialization.ISerializable, class System.Xml.Serialization.IXmlSerializable" />
<TypeSignature Language="DocId" Value="T:System.Data.DataSet" />
<TypeSignature Language="VB.NET" Value="Public Class DataSet&#xA;Inherits MarshalByValueComponent&#xA;Implements IListSource, ISerializable, ISupportInitializeNotification, IXmlSerializable" />
<TypeSignature Language="C++ CLI" Value="public ref class DataSet : System::ComponentModel::MarshalByValueComponent, System::ComponentModel::IListSource, System::ComponentModel::ISupportInitializeNotification, System::Runtime::Serialization::ISerializable, System::Xml::Serialization::IXmlSerializable" />
<TypeSignature Language="F#" Value="type DataSet = class&#xA; inherit MarshalByValueComponent&#xA; interface IListSource&#xA; interface IXmlSerializable&#xA; interface ISupportInitializeNotification&#xA; interface ISerializable&#xA; interface ISupportInitialize" />
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.MarshalByValueComponent</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ComponentModel.IListSource</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ISupportInitialize</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ISupportInitializeNotification</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Xml.Serialization.IXmlSerializable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.ComponentModel.DefaultProperty("DataSetName")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="xamarinmac-3.0">
<AttributeName>System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.DataSetDesigner, Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="xamarinmac-3.0">
<AttributeName>System.ComponentModel.ToolboxItem("Microsoft.VSDesigner.Data.VS.DataSetToolboxItem, Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-3.0">
<AttributeName>System.Xml.Serialization.XmlRoot("DataSet")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.Xml.Serialization.XmlSchemaProvider("GetDataSetSchema")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;netframework-4.8;netcore-2.0;netstandard-2.1">
<AttributeName>System.ComponentModel.ToolboxItem("Microsoft.VSDesigner.Data.VS.DataSetToolboxItem, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.DataSetDesigner, Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.ToolboxItem("Microsoft.VSDesigner.Data.VS.DataSetToolboxItem, Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.DataSetDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.ToolboxItem("Microsoft.VSDesigner.Data.VS.DataSetToolboxItem, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.DataSetDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8">
<AttributeName>System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.DataSetDesigner, Microsoft.VSDesigner, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8">
<AttributeName>System.ComponentModel.ToolboxItem("Microsoft.VSDesigner.Data.VS.DataSetToolboxItem, Microsoft.VSDesigner, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<AttributeName>System.Serializable</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents an in-memory cache of data.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataSet>, which is an in-memory cache of data retrieved from a data source, is a major component of the ADO.NET architecture. The <xref:System.Data.DataSet> consists of a collection of <xref:System.Data.DataTable> objects that you can relate to each other with <xref:System.Data.DataRelation> objects. You can also enforce data integrity in the <xref:System.Data.DataSet> by using the <xref:System.Data.UniqueConstraint> and <xref:System.Data.ForeignKeyConstraint> objects. For further details about working with <xref:System.Data.DataSet> objects, see [DataSets, DataTables, and DataViews](~/docs/framework/data/adonet/dataset-datatable-dataview/index.md).
Whereas <xref:System.Data.DataTable> objects contain the data, the <xref:System.Data.DataRelationCollection> allows you to navigate though the table hierarchy. The tables are contained in a <xref:System.Data.DataTableCollection> accessed through the <xref:System.Data.DataSet.Tables%2A> property. When accessing <xref:System.Data.DataTable> objects, note that they are conditionally case sensitive. For example, if one <xref:System.Data.DataTable> is named "mydatatable" and another is named "Mydatatable", a string used to search for one of the tables is regarded as case sensitive. However, if "mydatatable" exists and "Mydatatable" does not, the search string is regarded as case insensitive. For more information about working with <xref:System.Data.DataTable> objects, see [Creating a DataTable](~/docs/framework/data/adonet/dataset-datatable-dataview/creating-a-datatable.md).
A <xref:System.Data.DataSet> can read and write data and schema as XML documents. The data and schema can then be transported across HTTP and used by any application, on any platform that is XML-enabled. You can save the schema as an XML schema with the <xref:System.Data.DataSet.WriteXmlSchema%2A> method, and both schema and data can be saved using the <xref:System.Data.DataSet.WriteXml%2A> method. To read an XML document that includes both schema and data, use the <xref:System.Data.DataSet.ReadXml%2A> method.
In a typical multiple-tier implementation, the steps for creating and refreshing a <xref:System.Data.DataSet>, and in turn, updating the original data are to:
1. Build and fill each <xref:System.Data.DataTable> in a <xref:System.Data.DataSet> with data from a data source using a <xref:System.Data.Common.DataAdapter>.
2. Change the data in individual <xref:System.Data.DataTable> objects by adding, updating, or deleting <xref:System.Data.DataRow> objects.
3. Invoke the <xref:System.Data.DataSet.GetChanges%2A> method to create a second <xref:System.Data.DataSet> that features only the changes to the data.
4. Call the <xref:System.Data.Common.DataAdapter.Update%2A> method of the <xref:System.Data.Common.DataAdapter>, passing the second <xref:System.Data.DataSet> as an argument.
5. Invoke the <xref:System.Data.DataSet.Merge%2A> method to merge the changes from the second <xref:System.Data.DataSet> into the first.
6. Invoke the <xref:System.Data.DataSet.AcceptChanges%2A> on the <xref:System.Data.DataSet>. Alternatively, invoke <xref:System.Data.DataSet.RejectChanges%2A> to cancel the changes.
> [!NOTE]
> The <xref:System.Data.DataSet> and <xref:System.Data.DataTable> objects inherit from <xref:System.ComponentModel.MarshalByValueComponent>, and support the <xref:System.Runtime.Serialization.ISerializable> interface for remoting. These are the only ADO.NET objects that can be remoted.
> [!NOTE]
> Classes inherited from <xref:System.Data.DataSet> are not finalized by the garbage collector, because the finalizer has been suppressed in <xref:System.Data.DataSet>. The derived class can call the <xref:System.GC.ReRegisterForFinalize%2A> method in its constructor to allow the class to be finalized by the garbage collector.
## Examples
The following example consists of several methods that, combined, create and fill a <xref:System.Data.DataSet> from the **Northwind** database.
[!code-csharp[Classic WebData DataSet Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet Example/VB/source.vb#1)]
]]></format>
</remarks>
<threadsafe>This type is safe for multithreaded read operations. You must synchronize any write operations.</threadsafe>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Data.DataSet" /> class.</summary>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataSet ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; DataSet();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Data.DataSet" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This implementation of the <xref:System.Data.DataSet> constructor takes no parameters, and creates a default name, "NewDataSet," for the new instance.
A name for the <xref:System.Data.DataSet> is required to ensure that the XML representation of the <xref:System.Data.DataSet> always has a name for the document element, which is the highest-level element in a schema definition.
## Examples
The following example creates a new <xref:System.Data.DataSet>, and adds two <xref:System.Data.DataTable> objects to it.
[!code-vb[Classic WebData DataSet.DataSet Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.DataSet Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Data.DataTableCollection" />
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataSet (string dataSetName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string dataSetName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (dataSetName As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; DataSet(System::String ^ dataSetName);" />
<MemberSignature Language="F#" Value="new System.Data.DataSet : string -&gt; System.Data.DataSet" Usage="new System.Data.DataSet dataSetName" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="dataSetName" Type="System.String" />
</Parameters>
<Docs>
<param name="dataSetName">The name of the <see cref="T:System.Data.DataSet" />.</param>
<summary>Initializes a new instance of a <see cref="T:System.Data.DataSet" /> class with the given name.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A name for the <xref:System.Data.DataSet> is required to ensure that the XML representation of the <xref:System.Data.DataSet> always has a name for the document element, which is the highest level element in a schema definition.
## Examples
The following example creates a new <xref:System.Data.DataSet>, to which two <xref:System.Data.DataTable> objects are added.
[!code-vb[Classic WebData DataSet.DataSet1 Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.DataSet1 Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.Data.DataSet.DataSetName" />
<altmember cref="T:System.Data.DataTableCollection" />
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected DataSet (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="VB.NET" Value="Protected Sub New (info As SerializationInfo, context As StreamingContext)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; DataSet(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);" />
<MemberSignature Language="F#" Value="new System.Data.DataSet : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; System.Data.DataSet" Usage="new System.Data.DataSet (info, context)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
</Parameters>
<Docs>
<param name="info">The data needed to serialize or deserialize an object.</param>
<param name="context">The source and destination of a given serialized stream.</param>
<summary>Initializes a new instance of a <see cref="T:System.Data.DataSet" /> class that has the given serialization information and context.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
[!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected DataSet (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, bool ConstructSchema);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context, bool ConstructSchema) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Sub New (info As SerializationInfo, context As StreamingContext, ConstructSchema As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; DataSet(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context, bool ConstructSchema);" />
<MemberSignature Language="F#" Value="new System.Data.DataSet : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext * bool -&gt; System.Data.DataSet" Usage="new System.Data.DataSet (info, context, ConstructSchema)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="ConstructSchema" Type="System.Boolean" Index="2" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object.</param>
<param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> object.</param>
<param name="ConstructSchema">The boolean value.</param>
<summary>Initializes a new instance of the <see cref="T:System.Data.DataSet" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
[!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AcceptChanges">
<MemberSignature Language="C#" Value="public void AcceptChanges ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AcceptChanges() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.AcceptChanges" />
<MemberSignature Language="VB.NET" Value="Public Sub AcceptChanges ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void AcceptChanges();" />
<MemberSignature Language="F#" Value="member this.AcceptChanges : unit -&gt; unit" Usage="dataSet.AcceptChanges " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Commits all the changes made to this <see cref="T:System.Data.DataSet" /> since it was loaded or since the last time <see cref="M:System.Data.DataSet.AcceptChanges" /> was called.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Both the <xref:System.Data.DataRow> and <xref:System.Data.DataTable> classes have <xref:System.Data.DataSet.AcceptChanges%2A> methods. Calling <xref:System.Data.DataTable.AcceptChanges%2A> at the <xref:System.Data.DataTable> level causes the <xref:System.Data.DataRow.AcceptChanges%2A> method for each <xref:System.Data.DataRow> to be called. Similarly, invoking <xref:System.Data.DataSet.AcceptChanges%2A> on the <xref:System.Data.DataSet> causes <xref:System.Data.DataTable.AcceptChanges%2A> to be called on each table within the <xref:System.Data.DataSet>. In this manner, you have multiple levels at which the method can be invoked. Calling the <xref:System.Data.DataSet.AcceptChanges%2A> of the <xref:System.Data.DataSet> enables you to invoke the method on all subordinate objects (for example, tables and rows) with one call.
When you call `AcceptChanges` on the `DataSet`, any <xref:System.Data.DataRow> objects still in edit-mode end their edits successfully. The <xref:System.Data.DataRow.RowState%2A> property of each <xref:System.Data.DataRow> also changes; `Added` and `Modified` rows become `Unchanged`, and `Deleted` rows are removed.
If the `DataSet` contains <xref:System.Data.ForeignKeyConstraint> objects, invoking the `AcceptChanges` method also causes the <xref:System.Data.ForeignKeyConstraint.AcceptRejectRule%2A> to be enforced.
> [!NOTE]
> `AcceptChanges` and `RejectChanges` only apply to `DataRow` related changes (that is, Add, Remove, Delete, and Modify). They are not applicable to schema or structural changes.
>
> Calling AcceptChanges will not replicate these changes back to the data source if the DataSet was filled using a DataAdapter. In that situation, call <xref:System.Data.Common.DataAdapter.Update%2A> instead. See [Updating Data Sources with DataAdapters](~/docs/framework/data/adonet/updating-data-sources-with-dataadapters.md) for more information.
## Examples
The following example adds a <xref:System.Data.DataRow> to a <xref:System.Data.DataTable> in a <xref:System.Data.DataSet>. The <xref:System.Data.DataSet.AcceptChanges%2A> method is then called on the <xref:System.Data.DataSet>, which cascades to all <xref:System.Data.DataTable> objects that it contains.
[!code-csharp[Classic WebData DataSet.AcceptChanges#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.AcceptChanges/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.AcceptChanges#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.AcceptChanges/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="BeginInit">
<MemberSignature Language="C#" Value="public void BeginInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void BeginInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.BeginInit" />
<MemberSignature Language="VB.NET" Value="Public Sub BeginInit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void BeginInit();" />
<MemberSignature Language="F#" Value="abstract member BeginInit : unit -&gt; unit&#xA;override this.BeginInit : unit -&gt; unit" Usage="dataSet.BeginInit " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ISupportInitialize.BeginInit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Begins the initialization of a <see cref="T:System.Data.DataSet" /> that is used on a form or used by another component. The initialization occurs at run time.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The Visual Studio .NET design environment uses this method to start the initialization of a component that is used on a form or used by another component. The <xref:System.Data.DataSet.EndInit%2A> method ends the initialization. Using the <xref:System.Data.DataSet.BeginInit%2A> and <xref:System.Data.DataSet.EndInit%2A> methods prevents the control from being used before it is fully initialized.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="CaseSensitive">
<MemberSignature Language="C#" Value="public bool CaseSensitive { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CaseSensitive" />
<MemberSignature Language="DocId" Value="P:System.Data.DataSet.CaseSensitive" />
<MemberSignature Language="VB.NET" Value="Public Property CaseSensitive As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool CaseSensitive { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.CaseSensitive : bool with get, set" Usage="System.Data.DataSet.CaseSensitive" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.Data.DataSysDescription("DataSetCaseSensitiveDescr")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether string comparisons within <see cref="T:System.Data.DataTable" /> objects are case-sensitive.</summary>
<value>
<see langword="true" /> if string comparisons are case-sensitive; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataSet.CaseSensitive%2A> property affects how sorting, searching, and filtering operations are performed on each <xref:System.Data.DataTable> object contained in a <xref:System.Data.DataSet> when using the <xref:System.Data.DataTable.Select%2A> method.
By default, setting the <xref:System.Data.DataSet.CaseSensitive%2A> property for a <xref:System.Data.DataSet> also sets the <xref:System.Data.DataTable.CaseSensitive%2A> property of each associated <xref:System.Data.DataTable> to the same value.
## Examples
The following example toggles the <xref:System.Data.DataSet.CaseSensitive%2A> property.
[!code-vb[Classic WebData DataSet.CaseSensitive Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.CaseSensitive Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.Clear" />
<MemberSignature Language="VB.NET" Value="Public Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Clear();" />
<MemberSignature Language="F#" Value="member this.Clear : unit -&gt; unit" Usage="dataSet.Clear " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Clears the <see cref="T:System.Data.DataSet" /> of any data by removing all rows in all tables.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Data.DataSet> is bound to an <xref:System.Xml.XmlDataDocument>, calling <xref:System.Data.DataSet.Clear%2A?displayProperty=nameWithType> or <xref:System.Data.DataTable.Clear%2A?displayProperty=nameWithType> raises the <xref:System.NotSupportedException>. To avoid this situation, traverse each table, removing each row one at a time.
## Examples
The following example clears the <xref:System.Data.DataSet> of all rows in all tables.
[!code-csharp[Classic WebData DataSet.Clear Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.Clear Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.Clear Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.Clear Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="Clone">
<MemberSignature Language="C#" Value="public virtual System.Data.DataSet Clone ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Data.DataSet Clone() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.Clone" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function Clone () As DataSet" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Data::DataSet ^ Clone();" />
<MemberSignature Language="F#" Value="abstract member Clone : unit -&gt; System.Data.DataSet&#xA;override this.Clone : unit -&gt; System.Data.DataSet" Usage="dataSet.Clone " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.DataSet</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Copies the structure of the <see cref="T:System.Data.DataSet" />, including all <see cref="T:System.Data.DataTable" /> schemas, relations, and constraints. Does not copy any data.</summary>
<returns>A new <see cref="T:System.Data.DataSet" /> with the same schema as the current <see cref="T:System.Data.DataSet" />, but none of the data.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> If these classes have been subclassed, the clone will also be of the same subclasses.
## Examples
The following example creates a clone of a <xref:System.Data.DataSet> object's schema.
[!code-csharp[Classic WebData DataSet.Clone Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.Clone Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.Clone Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.Clone Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Data.DataSet.Copy" />
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="Copy">
<MemberSignature Language="C#" Value="public System.Data.DataSet Copy ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Data.DataSet Copy() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.Copy" />
<MemberSignature Language="VB.NET" Value="Public Function Copy () As DataSet" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Data::DataSet ^ Copy();" />
<MemberSignature Language="F#" Value="member this.Copy : unit -&gt; System.Data.DataSet" Usage="dataSet.Copy " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.DataSet</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Copies both the structure and data for this <see cref="T:System.Data.DataSet" />.</summary>
<returns>A new <see cref="T:System.Data.DataSet" /> with the same structure (table schemas, relations, and constraints) and data as this <see cref="T:System.Data.DataSet" />.
<block subset="none" type="note"><para>
If these classes have been subclassed, the copy will also be of the same subclasses.
</para></block></returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the <xref:System.Data.DataSet.Copy%2A> method to create a copy of the original <xref:System.Data.DataSet>.
[!code-csharp[Classic WebData DataSet.Copy Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.Copy Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.Copy Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.Copy Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Data.DataSet.Clone" />
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<MemberGroup MemberName="CreateDataReader">
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Returns a <see cref="T:System.Data.DataTableReader" /> with one result set per <see cref="T:System.Data.DataTable" />, in the same sequence as the tables appear in the <see cref="P:System.Data.DataSet.Tables" /> collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In order to ensure the order of the result sets within the returned <xref:System.Data.DataTableReader>, if a <xref:System.Data.DataTable> within the <xref:System.Data.DataSet> is empty, it will be represented by an empty result set within the returned `DataTableReader`.
## Examples
This example, a Console application, creates three <xref:System.Data.DataTable> instances and adds each to a <xref:System.Data.DataSet>. The example calls the <xref:System.Data.DataSet.CreateDataReader%2A> method and displays the contents of the returned <xref:System.Data.DataTableReader>. Note that the order of the result sets in the `DataTableReader` is controlled by the order of the `DataTable` instances passed as parameters.
> [!NOTE]
> This example shows how to use one of the overloaded versions of `CreateDataReader`. For other examples that might be available, see the individual overload topics.
[!code-csharp[DataWorks DataSet.CreateDataReader#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/DataWorks DataSet.CreateDataReader/CS/source.cs#1)]
[!code-vb[DataWorks DataSet.CreateDataReader#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks DataSet.CreateDataReader/VB/source.vb#1)]
The example displays the following code in the Console window:
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</MemberGroup>
<Member MemberName="CreateDataReader">
<MemberSignature Language="C#" Value="public System.Data.DataTableReader CreateDataReader ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Data.DataTableReader CreateDataReader() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.CreateDataReader" />
<MemberSignature Language="VB.NET" Value="Public Function CreateDataReader () As DataTableReader" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Data::DataTableReader ^ CreateDataReader();" />
<MemberSignature Language="F#" Value="member this.CreateDataReader : unit -&gt; System.Data.DataTableReader" Usage="dataSet.CreateDataReader " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.DataTableReader</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a <see cref="T:System.Data.DataTableReader" /> with one result set per <see cref="T:System.Data.DataTable" />, in the same sequence as the tables appear in the <see cref="P:System.Data.DataSet.Tables" /> collection.</summary>
<returns>A <see cref="T:System.Data.DataTableReader" /> containing one or more result sets, corresponding to the <see cref="T:System.Data.DataTable" /> instances contained within the source <see cref="T:System.Data.DataSet" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In order to ensure the order of the result sets within the returned <xref:System.Data.DataTableReader>, if a <xref:System.Data.DataTable> within the <xref:System.Data.DataSet> is empty, it is represented by an empty result set within the returned `DataTableReader`.
## Examples
The following example creates three <xref:System.Data.DataTable> instances, and adds each to a <xref:System.Data.DataSet>. The example then passes the filled `DataSet` to a procedure that calls the <xref:System.Data.DataSet.CreateDataReader%2A> method, and proceeds to iterate through all the result sets contained within the <xref:System.Data.DataTableReader>. The example displays the results in the Console window.
[!code-csharp[DataWorks DataSet.DataTableReader#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/DataWorks DataSet.DataTableReader/CS/source.cs#1)]
[!code-vb[DataWorks DataSet.DataTableReader#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks DataSet.DataTableReader/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="CreateDataReader">
<MemberSignature Language="C#" Value="public System.Data.DataTableReader CreateDataReader (params System.Data.DataTable[] dataTables);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Data.DataTableReader CreateDataReader(class System.Data.DataTable[] dataTables) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.CreateDataReader(System.Data.DataTable[])" />
<MemberSignature Language="VB.NET" Value="Public Function CreateDataReader (ParamArray dataTables As DataTable()) As DataTableReader" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Data::DataTableReader ^ CreateDataReader(... cli::array &lt;System::Data::DataTable ^&gt; ^ dataTables);" />
<MemberSignature Language="F#" Value="member this.CreateDataReader : System.Data.DataTable[] -&gt; System.Data.DataTableReader" Usage="dataSet.CreateDataReader dataTables" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.DataTableReader</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataTables" Type="System.Data.DataTable[]" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0">
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="dataTables">An array of DataTables providing the order of the result sets to be returned in the <see cref="T:System.Data.DataTableReader" />.</param>
<summary>Returns a <see cref="T:System.Data.DataTableReader" /> with one result set per <see cref="T:System.Data.DataTable" />.</summary>
<returns>A <see cref="T:System.Data.DataTableReader" /> containing one or more result sets, corresponding to the <see cref="T:System.Data.DataTable" /> instances contained within the source <see cref="T:System.Data.DataSet" />. The returned result sets are in the order specified by the <paramref name="dataTables" /> parameter.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In order to ensure that the order of the result sets within the returned <xref:System.Data.DataTableReader>, if a <xref:System.Data.DataTable> within the <xref:System.Data.DataSet> is empty, it is represented by an empty result set within the returned `DataTableReader`. Because this overloaded version allows you to supply a list of `DataTable` instances as parameters, you can specify the order in which the result sets appear within the returned `DataTableReader`.
## Examples
This example, a Console application, creates three <xref:System.Data.DataTable> instances and adds each to a <xref:System.Data.DataSet>. The example calls the <xref:System.Data.DataSet.CreateDataReader%2A> method and displays the contents of the returned <xref:System.Data.DataTableReader>. Note that the order of the result sets in the `DataTableReader` is controlled by the order of the `DataTable` instances passed as parameters. The example displays the results in the Console window.
[!code-csharp[DataWorks DataSet.DataTableReaderTables#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/DataWorks DataSet.DataTableReaderTables/CS/source.cs#1)]
[!code-vb[DataWorks DataSet.DataTableReaderTables#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks DataSet.DataTableReaderTables/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="DataSetName">
<MemberSignature Language="C#" Value="public string DataSetName { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DataSetName" />
<MemberSignature Language="DocId" Value="P:System.Data.DataSet.DataSetName" />
<MemberSignature Language="VB.NET" Value="Public Property DataSetName As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ DataSetName { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DataSetName : string with get, set" Usage="System.Data.DataSet.DataSetName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.Data.DataSysDescription("DataSetDataSetNameDescr")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of the current <see cref="T:System.Data.DataSet" />.</summary>
<value>The name of the <see cref="T:System.Data.DataSet" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example creates a new <xref:System.Data.DataSet> with the given <xref:System.Data.DataSet.DataSetName%2A>.
[!code-csharp[Classic WebData DataSet.DataSetName Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.DataSetName Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.DataSetName Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.DataSetName Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="DefaultViewManager">
<MemberSignature Language="C#" Value="public System.Data.DataViewManager DefaultViewManager { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.DataViewManager DefaultViewManager" />
<MemberSignature Language="DocId" Value="P:System.Data.DataSet.DefaultViewManager" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DefaultViewManager As DataViewManager" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Data::DataViewManager ^ DefaultViewManager { System::Data::DataViewManager ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DefaultViewManager : System.Data.DataViewManager" Usage="System.Data.DataSet.DefaultViewManager" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.Data.DataSysDescription("DataSetDefaultViewDescr")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.DataViewManager</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a custom view of the data contained in the <see cref="T:System.Data.DataSet" /> to allow filtering, searching, and navigating using a custom <see cref="T:System.Data.DataViewManager" />.</summary>
<value>A <see cref="T:System.Data.DataViewManager" /> object.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataViewManager> returned by the <xref:System.Data.DataSet.DefaultViewManager%2A> property allows you to create custom settings for each <xref:System.Data.DataTable> in the <xref:System.Data.DataSet>.
When you obtain a <xref:System.Data.DataView> from a <xref:System.Data.DataTable>, the sort order, filtering, and <xref:System.Data.DataViewRowState> are configured according to the settings in the <xref:System.Data.DataSet.DefaultViewManager%2A> property.
## Examples
The following example gets the default <xref:System.Data.DataViewManager> for a <xref:System.Data.DataSet>, and adds a <xref:System.Data.DataTable> to the <xref:System.Data.DataTableCollection>.
[!code-vb[Classic WebData DataSet.DefaultViewManager Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.DefaultViewManager Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<MemberGroup MemberName="DetermineSchemaSerializationMode">
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Determines the <see cref="P:System.Data.DataSet.SchemaSerializationMode" /> for a <see cref="T:System.Data.DataSet" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method can be called when deserializing a typed <xref:System.Data.DataSet> to determine its <xref:System.Data.DataSet.SchemaSerializationMode%2A>.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</MemberGroup>
<Member MemberName="DetermineSchemaSerializationMode">
<MemberSignature Language="C#" Value="protected System.Data.SchemaSerializationMode DetermineSchemaSerializationMode (System.Xml.XmlReader reader);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance valuetype System.Data.SchemaSerializationMode DetermineSchemaSerializationMode(class System.Xml.XmlReader reader) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.DetermineSchemaSerializationMode(System.Xml.XmlReader)" />
<MemberSignature Language="VB.NET" Value="Protected Function DetermineSchemaSerializationMode (reader As XmlReader) As SchemaSerializationMode" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; System::Data::SchemaSerializationMode DetermineSchemaSerializationMode(System::Xml::XmlReader ^ reader);" />
<MemberSignature Language="F#" Value="member this.DetermineSchemaSerializationMode : System.Xml.XmlReader -&gt; System.Data.SchemaSerializationMode" Usage="dataSet.DetermineSchemaSerializationMode reader" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.SchemaSerializationMode</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="reader" Type="System.Xml.XmlReader" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="reader">The <see cref="T:System.Xml.XmlReader" /> instance that is passed during deserialization of the <see cref="T:System.Data.DataSet" />.</param>
<summary>Determines the <see cref="P:System.Data.DataSet.SchemaSerializationMode" /> for a <see cref="T:System.Data.DataSet" />.</summary>
<returns>An <see cref="T:System.Data.SchemaSerializationMode" /> enumeration indicating whether schema information has been omitted from the payload.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method can be called when deserializing a typed <xref:System.Data.DataSet> to determine its <xref:System.Data.DataSet.SchemaSerializationMode%2A>.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="DetermineSchemaSerializationMode">
<MemberSignature Language="C#" Value="protected System.Data.SchemaSerializationMode DetermineSchemaSerializationMode (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance valuetype System.Data.SchemaSerializationMode DetermineSchemaSerializationMode(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.DetermineSchemaSerializationMode(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="VB.NET" Value="Protected Function DetermineSchemaSerializationMode (info As SerializationInfo, context As StreamingContext) As SchemaSerializationMode" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; System::Data::SchemaSerializationMode DetermineSchemaSerializationMode(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);" />
<MemberSignature Language="F#" Value="member this.DetermineSchemaSerializationMode : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; System.Data.SchemaSerializationMode" Usage="dataSet.DetermineSchemaSerializationMode (info, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.SchemaSerializationMode</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that a <see langword="DataSet" />'s protected constructor <see cref="M:System.Data.DataSet.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" /> is invoked with during deserialization in remoting scenarios.</param>
<param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that a <see langword="DataSet" />'s protected constructor <see cref="M:System.Data.DataSet.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" /> is invoked with during deserialization in remoting scenarios.</param>
<summary>Determines the <see cref="P:System.Data.DataSet.SchemaSerializationMode" /> for a <see cref="T:System.Data.DataSet" />.</summary>
<returns>An <see cref="T:System.Data.SchemaSerializationMode" /> enumeration indicating whether schema information has been omitted from the payload.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method can be called when deserializing a typed <xref:System.Data.DataSet> to determine its <xref:System.Data.DataSet.SchemaSerializationMode%2A>.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="EndInit">
<MemberSignature Language="C#" Value="public void EndInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void EndInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.EndInit" />
<MemberSignature Language="VB.NET" Value="Public Sub EndInit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void EndInit();" />
<MemberSignature Language="F#" Value="abstract member EndInit : unit -&gt; unit&#xA;override this.EndInit : unit -&gt; unit" Usage="dataSet.EndInit " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ISupportInitialize.EndInit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Ends the initialization of a <see cref="T:System.Data.DataSet" /> that is used on a form or used by another component. The initialization occurs at run time.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The Visual Studio .NET design environment uses this method to end the initialization of a component that is used on a form or used by another component. The <xref:System.Data.DataSet.BeginInit%2A> method starts the initialization. Using the <xref:System.Data.DataSet.BeginInit%2A> and <xref:System.Data.DataSet.EndInit%2A> methods prevents the control from being used before it is fully initialized.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="EnforceConstraints">
<MemberSignature Language="C#" Value="public bool EnforceConstraints { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool EnforceConstraints" />
<MemberSignature Language="DocId" Value="P:System.Data.DataSet.EnforceConstraints" />
<MemberSignature Language="VB.NET" Value="Public Property EnforceConstraints As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool EnforceConstraints { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.EnforceConstraints : bool with get, set" Usage="System.Data.DataSet.EnforceConstraints" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.Data.DataSysDescription("DataSetEnforceConstraintsDescr")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether constraint rules are followed when attempting any update operation.</summary>
<value>
<see langword="true" /> if rules are enforced; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Constraints are set at the <xref:System.Data.DataTable> level (<xref:System.Data.DataTable.Constraints%2A> property). For more information about creating constraints, see [DataTable Constraints](~/docs/framework/data/adonet/dataset-datatable-dataview/datatable-constraints.md).
## Examples
The following example creates a <xref:System.Data.DataSet> with one table, one column, five rows, and one <xref:System.Data.UniqueConstraint>. The <xref:System.Data.DataSet.EnforceConstraints%2A> property is set to `false` and the values of each row are set to the same value. When the <xref:System.Data.DataSet.EnforceConstraints%2A> property is reset to `true`, a <xref:System.Data.ConstraintException> is generated.
[!code-csharp[Classic WebData DataSet.EnforceConstraints Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.EnforceConstraints Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.EnforceConstraints Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.EnforceConstraints Example/VB/source.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.Data.ConstraintException">One or more constraints cannot be enforced.</exception>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="ExtendedProperties">
<MemberSignature Language="C#" Value="public System.Data.PropertyCollection ExtendedProperties { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.PropertyCollection ExtendedProperties" />
<MemberSignature Language="DocId" Value="P:System.Data.DataSet.ExtendedProperties" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ExtendedProperties As PropertyCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Data::PropertyCollection ^ ExtendedProperties { System::Data::PropertyCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ExtendedProperties : System.Data.PropertyCollection" Usage="System.Data.DataSet.ExtendedProperties" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.Data.DataSysDescription("ExtendedPropertiesDescr")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.PropertyCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the collection of customized user information associated with the <see langword="DataSet" />.</summary>
<value>A <see cref="T:System.Data.PropertyCollection" /> with all custom user information.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataSet.ExtendedProperties%2A> property enables you to store custom information with the `DataSet`. For example, you might store a time when the data should be refreshed.
Extended properties must be of type <xref:System.String> if you want them persisted when the <xref:System.Data.DataSet> is written as XML.
## Examples
The following example adds a custom property to the <xref:System.Data.PropertyCollection> returned by the <xref:System.Data.DataColumn.ExtendedProperties%2A> property. The second example retrieves the custom property.
[!code-csharp[Classic WebData DataColumn.ExtendedProperties Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataColumn.ExtendedProperties Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataColumn.ExtendedProperties Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataColumn.ExtendedProperties Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<MemberGroup MemberName="GetChanges">
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Gets a copy of the <see cref="T:System.Data.DataSet" /> containing all changes made to it since it was last loaded, or since <see cref="M:System.Data.DataSet.AcceptChanges" /> was called.</summary>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</MemberGroup>
<Member MemberName="GetChanges">
<MemberSignature Language="C#" Value="public System.Data.DataSet GetChanges ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Data.DataSet GetChanges() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.GetChanges" />
<MemberSignature Language="VB.NET" Value="Public Function GetChanges () As DataSet" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Data::DataSet ^ GetChanges();" />
<MemberSignature Language="F#" Value="member this.GetChanges : unit -&gt; System.Data.DataSet" Usage="dataSet.GetChanges " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.DataSet</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a copy of the <see cref="T:System.Data.DataSet" /> that contains all changes made to it since it was loaded or since <see cref="M:System.Data.DataSet.AcceptChanges" /> was last called.</summary>
<returns>A copy of the changes from this <see cref="T:System.Data.DataSet" /> that can have actions performed on it and later be merged back in using <see cref="M:System.Data.DataSet.Merge(System.Data.DataSet)" />. If no changed rows are found, the method returns <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Creates a new <xref:System.Data.DataSet> that contains a copy of all rows in the original <xref:System.Data.DataSet> that have pending changes. Relationship constraints can cause additional unchanged rows to be added to the new <xref:System.Data.DataSet> if the unchanged rows contain primary keys corresponding to foreign keys in the changed rows. The method returns `null` if there are no rows in the original <xref:System.Data.DataSet> that have pending changes.
## Examples
The following example creates a simple <xref:System.Data.DataSet> with one table, two columns, and ten rows. Two values are changed, and one row is added. A subset of the changed data is created using the <xref:System.Data.DataSet.GetChanges%2A> method. After reconciling errors, a new column is added to the subset, changing the schema. When the <xref:System.Data.DataSet.Merge%2A> method is called with the `missingSchemaAction` set to `MissingSchemaAction.Add`, the new column is added to the original <xref:System.Data.DataSet> object's schema.
[!code-csharp[Classic WebData DataSet.GetChanges Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.GetChanges Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.GetChanges Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.GetChanges Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Data.DataSet.HasChanges" />
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="GetChanges">
<MemberSignature Language="C#" Value="public System.Data.DataSet GetChanges (System.Data.DataRowState rowStates);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Data.DataSet GetChanges(valuetype System.Data.DataRowState rowStates) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.GetChanges(System.Data.DataRowState)" />
<MemberSignature Language="VB.NET" Value="Public Function GetChanges (rowStates As DataRowState) As DataSet" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Data::DataSet ^ GetChanges(System::Data::DataRowState rowStates);" />
<MemberSignature Language="F#" Value="member this.GetChanges : System.Data.DataRowState -&gt; System.Data.DataSet" Usage="dataSet.GetChanges rowStates" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.DataSet</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rowStates" Type="System.Data.DataRowState" />
</Parameters>
<Docs>
<param name="rowStates">One of the <see cref="T:System.Data.DataRowState" /> values.</param>
<summary>Gets a copy of the <see cref="T:System.Data.DataSet" /> containing all changes made to it since it was last loaded, or since <see cref="M:System.Data.DataSet.AcceptChanges" /> was called, filtered by <see cref="T:System.Data.DataRowState" />.</summary>
<returns>A filtered copy of the <see cref="T:System.Data.DataSet" /> that can have actions performed on it, and subsequently be merged back in using <see cref="M:System.Data.DataSet.Merge(System.Data.DataSet)" />. If no rows of the desired <see cref="T:System.Data.DataRowState" /> are found, the method returns <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataSet.GetChanges%2A> method is used to produce a second <xref:System.Data.DataSet> object that contains only the changes introduced into the original. Use the `rowStates` argument to specify the type of changes the new object should include.
This returned copy is designed to be merged back in to this original <xref:System.Data.DataSet>. Relationship constraints may cause parent rows marked `Unchanged` to be included. If no rows of the desired <xref:System.Data.DataRowState> are found, the <xref:System.Data.DataSet.GetChanges%2A> method returns `null`.
## Examples
The following example uses the <xref:System.Data.DataSet.GetChanges%2A> method to create a second <xref:System.Data.DataSet> object, which is then used to update a data source.
[!code-csharp[Classic WebData DataSet.GetChanges1 Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.GetChanges1 Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.GetChanges1 Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.GetChanges1 Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="GetDataSetSchema">
<MemberSignature Language="C#" Value="public static System.Xml.Schema.XmlSchemaComplexType GetDataSetSchema (System.Xml.Schema.XmlSchemaSet schemaSet);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Xml.Schema.XmlSchemaComplexType GetDataSetSchema(class System.Xml.Schema.XmlSchemaSet schemaSet) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.GetDataSetSchema(System.Xml.Schema.XmlSchemaSet)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetDataSetSchema (schemaSet As XmlSchemaSet) As XmlSchemaComplexType" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Xml::Schema::XmlSchemaComplexType ^ GetDataSetSchema(System::Xml::Schema::XmlSchemaSet ^ schemaSet);" />
<MemberSignature Language="F#" Value="static member GetDataSetSchema : System.Xml.Schema.XmlSchemaSet -&gt; System.Xml.Schema.XmlSchemaComplexType" Usage="System.Data.DataSet.GetDataSetSchema schemaSet" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Xml.Schema.XmlSchemaComplexType</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="schemaSet" Type="System.Xml.Schema.XmlSchemaSet" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="schemaSet">The specified schema set.</param>
<summary>Gets a copy of <see cref="T:System.Xml.Schema.XmlSchemaSet" /> for the DataSet.</summary>
<returns>A copy of <see cref="T:System.Xml.Schema.XmlSchemaSet" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetObjectData">
<MemberSignature Language="C#" Value="public virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void GetObjectData(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub GetObjectData (info As SerializationInfo, context As StreamingContext)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);" />
<MemberSignature Language="F#" Value="abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; unit&#xA;override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; unit" Usage="dataSet.GetObjectData (info, context)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized data associated with the <see cref="T:System.Data.DataSet" />.</param>
<param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains the source and destination of the serialized stream associated with the <see cref="T:System.Data.DataSet" />.</param>
<summary>Populates a serialization information object with the data needed to serialize the <see cref="T:System.Data.DataSet" />.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is <see langword="null" />.</exception>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="GetSchemaSerializable">
<MemberSignature Language="C#" Value="protected virtual System.Xml.Schema.XmlSchema GetSchemaSerializable ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Xml.Schema.XmlSchema GetSchemaSerializable() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.GetSchemaSerializable" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function GetSchemaSerializable () As XmlSchema" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual System::Xml::Schema::XmlSchema ^ GetSchemaSerializable();" />
<MemberSignature Language="F#" Value="abstract member GetSchemaSerializable : unit -&gt; System.Xml.Schema.XmlSchema&#xA;override this.GetSchemaSerializable : unit -&gt; System.Xml.Schema.XmlSchema" Usage="dataSet.GetSchemaSerializable " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Xml.Schema.XmlSchema</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a serializable <see cref="T:System.Xml.Schema.XmlSchema" /> instance.</summary>
<returns>The <see cref="T:System.Xml.Schema.XmlSchema" /> instance.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetSerializationData">
<MemberSignature Language="C#" Value="protected void GetSerializationData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void GetSerializationData(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.GetSerializationData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="VB.NET" Value="Protected Sub GetSerializationData (info As SerializationInfo, context As StreamingContext)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void GetSerializationData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);" />
<MemberSignature Language="F#" Value="member this.GetSerializationData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; unit" Usage="dataSet.GetSerializationData (info, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
</Parameters>
<Docs>
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> instance.</param>
<param name="context">The streaming context.</param>
<summary>Deserializes the table data from the binary or XML stream.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetXml">
<MemberSignature Language="C#" Value="public string GetXml ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetXml() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.GetXml" />
<MemberSignature Language="VB.NET" Value="Public Function GetXml () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetXml();" />
<MemberSignature Language="F#" Value="member this.GetXml : unit -&gt; string" Usage="dataSet.GetXml " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the XML representation of the data stored in the <see cref="T:System.Data.DataSet" />.</summary>
<returns>A string that is a representation of the data stored in the <see cref="T:System.Data.DataSet" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Calling this method is identical to calling <xref:System.Data.DataSet.WriteXml%2A> with <xref:System.Data.XmlWriteMode> set to <xref:System.Data.XmlWriteMode.IgnoreSchema>.
<xref:System.Data.DataSet.GetXml%2A> returns XML as a string, and therefore requires more overhead than <xref:System.Data.DataSet.WriteXml%2A> to write XML to a file.
If you build a <xref:System.Data.DataSet> using schema inference and serialize it using XML or Web services, the column ordering may change.
## Examples
The following example creates a <xref:System.Data.DataSet> and <xref:System.Data.DataTable>, adds sample data, and then displays the data in XML format.
[!code-csharp[Classic WebData DataSet.GetXml Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.GetXml Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.GetXml Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.GetXml Example/VB/source.vb#1)]
This sample demonstrates how to write data into an XML file from a DataSet and read data into DataSet from XML. This sample will create one dataset with two tables, use two ways to export a dataset into the XML files (WriteXml and GetXml), and use two ways (ReadXml and InferXmlSchema) to import a dataset from the XML files.
Before you compile and run the sample, you need to create four XML files in the sample directory. First, create ElementsWithAttributes.xml:
```xml
<MySchool>
<Course CourseID="C1045" Year="2012" Title="Calculus" Credits="4" DepartmentID="7">New</Course>
<Course CourseID="C1061" Year="2012" Title="Physics" Credits="4" DepartmentID="1" />
<Department DepartmentID="1" Name="Engineering" Budget="350000" StartDate="2007-09-01T00:00:00+08:00" Administrator="2" />
<Department DepartmentID="7" Name="Mathematics" Budget="250024" StartDate="2007-09-01T00:00:00+08:00" Administrator="3">Cancelled</Department>
</MySchool>
```
Next, create ElementsWithChildElementsxml.xml:
```xml
<MySchool>
<Course>
<CourseID>C1045</CourseID>
<Year>2012</Year>
<Title>Calculus</Title>
<Credits>4</Credits>
<DepartmentID>7</DepartmentID>
</Course>
<Course>
<CourseID>C1061</CourseID>
<Year>2012</Year>
<Title>Physics</Title>
<Credits>4</Credits>
<DepartmentID>1</DepartmentID>
</Course>
<Course>
<CourseID>C2021</CourseID>
<Year>2012</Year>
<Title>Composition</Title>
<Credits>3</Credits>
<DepartmentID>2</DepartmentID>
</Course>
<Course>
<CourseID>C2042</CourseID>
<Year>2012</Year>
<Title>Literature</Title>
<Credits>4</Credits>
<DepartmentID>2</DepartmentID>
</Course>
<Department>
<DepartmentID>1</DepartmentID>
<Name>Engineering</Name>
<Budget>350000</Budget>
<StartDate>2007-09-01T00:00:00+08:00</StartDate>
<Administrator>2</Administrator>
</Department>
<Department>
<DepartmentID>2</DepartmentID>
<Name>English</Name>
<Budget>120000</Budget>
<StartDate>2007-09-01T00:00:00+08:00</StartDate>
<Administrator>6</Administrator>
</Department>
<Department>
<DepartmentID>4</DepartmentID>
<Name>Economics</Name>
<Budget>200000</Budget>
<StartDate>2007-09-01T00:00:00+08:00</StartDate>
<Administrator>4</Administrator>
</Department>
<Department>
<DepartmentID>7</DepartmentID>
<Name>Mathematics</Name>
<Budget>250024</Budget>
<StartDate>2007-09-01T00:00:00+08:00</StartDate>
<Administrator>3</Administrator>
</Department>
</MySchool>
```
Now create ElementsWithOnlyAttributes.xml:
```xml
<MySchool>
<Course CourseID="C1045" Year="2012" Title="Calculus" Credits="4" DepartmentID="7" />
<Course CourseID="C1061" Year="2012" Title="Physics" Credits="4" DepartmentID="1" />
<Department DepartmentID="1" Name="Engineering" Budget="350000" StartDate="2007-09-01T00:00:00+08:00" Administrator="2" />
<Department DepartmentID="7" Name="Mathematics" Budget="250024" StartDate="2007-09-01T00:00:00+08:00" Administrator="3" />
</MySchool>
```
And finally, create RepeatingElements.xml:
```xml
<MySchool>
<Course>C1045</Course>
<Course>C1061</Course>
<Department>Engineering</Department>
<Department>Mathematics</Department>
</MySchool>
```
Now you can compile and run the following source code. [How to Store Data of DataSet into XML File](https://code.msdn.microsoft.com/How-to-Store-Data-of-7b9710f3) has Visual Basic and C# projects for this sample.
```csharp
using System;
using System.Data;
using System.IO;
using System.Text;
using System.Xml;
// Use WriteXml method to export the dataset.
static class DataTableHelper {
public static void WriteDataSetToXML(DataSet dataset, String xmlFileName) {
using (FileStream fsWriterStream = new FileStream(xmlFileName, FileMode.Create)) {
using (XmlTextWriter xmlWriter = new XmlTextWriter(fsWriterStream, Encoding.Unicode)) {
dataset.WriteXml(xmlWriter, XmlWriteMode.WriteSchema);
Console.WriteLine("Write {0} to the File {1}.", dataset.DataSetName, xmlFileName);
Console.WriteLine();
}
}
}
// Use GetXml method to get the XML data of the dataset and then export to the file.
public static void GetXMLFromDataSet(DataSet dataset, String xmlFileName) {
using (StreamWriter writer = new StreamWriter(xmlFileName)) {
writer.WriteLine(dataset.GetXml());
Console.WriteLine("Get Xml data from {0} and write to the File {1}.", dataset.DataSetName, xmlFileName);
Console.WriteLine();
}
}
// Use ReadXml method to import the dataset from the dataset.
public static void ReadXmlIntoDataSet(DataSet newDataSet, String xmlFileName) {
using (FileStream fsReaderStream = new FileStream(xmlFileName, FileMode.Open)) {
using (XmlTextReader xmlReader = new XmlTextReader(fsReaderStream)) {
newDataSet.ReadXml(xmlReader, XmlReadMode.ReadSchema);
}
}
}
// Display the columns and value of DataSet.
public static void ShowDataSet(DataSet dataset) {
foreach (DataTable table in dataset.Tables) {
Console.WriteLine("Table {0}:", table.TableName);
ShowDataTable(table);
}
}
// Display the columns and value of DataTable.
private static void ShowDataTable(DataTable table) {
foreach (DataColumn col in table.Columns) {
Console.Write("{0,-14}", col.ColumnName);
}
Console.WriteLine("{0,-14}", "");
foreach (DataRow row in table.Rows) {
if (row.RowState == DataRowState.Deleted) {
foreach (DataColumn col in table.Columns) {
if (col.DataType.Equals(typeof(DateTime))) {
Console.Write("{0,-14:d}", row[col, DataRowVersion.Original]);
}
else if (col.DataType.Equals(typeof(Decimal))) {
Console.Write("{0,-14:C}", row[col, DataRowVersion.Original]);
}
else {
Console.Write("{0,-14}", row[col, DataRowVersion.Original]);
}
}
}
else {
foreach (DataColumn col in table.Columns) {
if (col.DataType.Equals(typeof(DateTime))) {
Console.Write("{0,-14:d}", row[col]);
}
else if (col.DataType.Equals(typeof(Decimal))) {
Console.Write("{0,-14:C}", row[col]);
}
else {
Console.Write("{0,-14}", row[col]);
}
}
}
Console.WriteLine("{0,-14}", "");
}
}
// Display the columns of DataSet.
public static void ShowDataSetSchema(DataSet dataSet) {
Console.WriteLine("{0} contains the following tables:", dataSet.DataSetName);
foreach (DataTable table in dataSet.Tables) {
Console.WriteLine(" Table {0} contains the following columns:", table.TableName);
ShowDataTableSchema(table);
}
}
// Display the columns of DataTable
private static void ShowDataTableSchema(DataTable table) {
String columnString = "";
foreach (DataColumn col in table.Columns) {
columnString += col.ColumnName + " ";
}
Console.WriteLine(columnString);
}
}
class Program {
static void Main(string[] args) {
// Create the DataSet
DataSet school = new DataSet("MySchool");
DataTable course = CreateCourse();
DataTable department = CreateDepartment();
school.Tables.Add(course);
school.Tables.Add(department);
// Define the constraint between the tables.
ForeignKeyConstraint courseDepartFK = new ForeignKeyConstraint("CourseDepartFK", department.Columns["DepartmentID"], course.Columns["DepartmentID"]);
courseDepartFK.DeleteRule = Rule.Cascade;
courseDepartFK.UpdateRule = Rule.Cascade;
courseDepartFK.AcceptRejectRule = AcceptRejectRule.None;
course.Constraints.Add(courseDepartFK);
InsertDepartments(department);
InsertCourses(course);
// Export the dataset to the XML file.
Console.WriteLine("Data of the whole DataSet {0}", school.DataSetName);
DataTableHelper.ShowDataSet(school);
String xmlWithSchemaFileName = "WriterXMLWithSchema.xml";
String xmlGetDataFileName = "GetXML.xml";
// Use two ways to export the dataset to the Xml file.
DataTableHelper.WriteDataSetToXML(school, xmlWithSchemaFileName);
DataTableHelper.GetXMLFromDataSet(school, xmlGetDataFileName);
// Import the dataset from the XML file.
// Use two ways to import the dataset from the Xml file.
Console.WriteLine("Read Xml document into a new DataSet:");
DataSet newSchool = new DataSet("NewSchool");
DataTableHelper.ReadXmlIntoDataSet(newSchool, xmlWithSchemaFileName);
DataTableHelper.ShowDataSetSchema(newSchool);
Console.WriteLine();
Console.WriteLine("Infer a schema for a DataSet from an XML document:");
InferDataSetSchemaFromXml();
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
static DataTable CreateCourse() {
DataTable course = new DataTable("Course");
DataColumn[] cols ={
new DataColumn("CourseID",typeof(String)),
new DataColumn("Year",typeof(Int32)),
new DataColumn("Title",typeof(String)),
new DataColumn("Credits",typeof(Int32)),
new DataColumn("DepartmentID",typeof(Int32))};
course.Columns.AddRange(cols);
course.PrimaryKey = new DataColumn[] { course.Columns["CourseID"], course.Columns["Year"] };
return course;
}
static DataTable CreateDepartment() {
DataTable department = new DataTable("Department");
DataColumn[] cols = {
new DataColumn("DepartmentID", typeof(Int32)),
new DataColumn("Name",typeof(String)),
new DataColumn("Budget",typeof(Decimal)),
new DataColumn("StartDate",typeof(DateTime)),
new DataColumn("Administrator",typeof(Int32))};
department.Columns.AddRange(cols);
department.PrimaryKey = new DataColumn[] { department.Columns["DepartmentID"] };
return department;
}
static void InsertDepartments(DataTable department) {
Object[] rows = {
new Object[]{1,"Engineering",350000.00,new DateTime(2007,9,1),2},
new Object[]{2,"English",120000.00,new DateTime(2007,9,1),6},
new Object[]{4,"Economics",200000.00,new DateTime(2007,9,1),4},
new Object[]{7,"Mathematics",250024.00,new DateTime(2007,9,1),3}};
foreach (Object[] row in rows) {
department.Rows.Add(row);
}
}
static void InsertCourses(DataTable course) {
Object[] rows ={
new Object[]{"C1045",2012,"Calculus",4,7},
new Object[]{"C1061",2012,"Physics",4,1},
new Object[]{"C2021",2012,"Composition",3,2},
new Object[]{"C2042",2012,"Literature",4,2}};
foreach (Object[] row in rows) {
course.Rows.Add(row);
}
}
// Display the results of inferring schema from four types of XML structures
private static void InferDataSetSchemaFromXml() {
String[] xmlFileNames = {
@"ElementsWithOnlyAttributes.xml",
@"ElementsWithAttributes.xml",
@"RepeatingElements.xml",
@"ElementsWithChildElements.xml" };
foreach (String xmlFileName in xmlFileNames) {
Console.WriteLine("Result of {0}", Path.GetFileNameWithoutExtension(xmlFileName));
DataSet newSchool = new DataSet();
newSchool.InferXmlSchema(xmlFileName, null);
DataTableHelper.ShowDataSetSchema(newSchool);
Console.WriteLine();
}
}
}
```
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="GetXmlSchema">
<MemberSignature Language="C#" Value="public string GetXmlSchema ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetXmlSchema() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.GetXmlSchema" />
<MemberSignature Language="VB.NET" Value="Public Function GetXmlSchema () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetXmlSchema();" />
<MemberSignature Language="F#" Value="member this.GetXmlSchema : unit -&gt; string" Usage="dataSet.GetXmlSchema " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the XML Schema for the XML representation of the data stored in the <see cref="T:System.Data.DataSet" />.</summary>
<returns>String that is the XML Schema for the XML representation of the data stored in the <see cref="T:System.Data.DataSet" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Calling this method is identical to calling <xref:System.Data.DataSet.WriteXmlSchema%2A>, except that only the primary schema is written.
<xref:System.Data.DataSet.GetXmlSchema%2A> returns XML as a string, and therefore requires more overhead than <xref:System.Data.DataSet.WriteXmlSchema%2A> to write XML to a file.
If you build a <xref:System.Data.DataSet> using schema inference and serialize it using XML or Web services, the column ordering may change.
## Examples
The following example creates a <xref:System.Data.DataSet> and <xref:System.Data.DataTable>, and then displays the schema in XML format.
[!code-csharp[Classic WebData DataSet.GetXmlSchema Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.GetXmlSchema Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.GetXmlSchema Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.GetXmlSchema Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<MemberGroup MemberName="HasChanges">
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Data.DataSet" /> has changes, including new, deleted, or modified rows.</summary>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</MemberGroup>
<Member MemberName="HasChanges">
<MemberSignature Language="C#" Value="public bool HasChanges ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool HasChanges() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.HasChanges" />
<MemberSignature Language="VB.NET" Value="Public Function HasChanges () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool HasChanges();" />
<MemberSignature Language="F#" Value="member this.HasChanges : unit -&gt; bool" Usage="dataSet.HasChanges " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Data.DataSet" /> has changes, including new, deleted, or modified rows.</summary>
<returns>
<see langword="true" /> if the <see cref="T:System.Data.DataSet" /> has changes; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the <xref:System.Data.DataSet.GetChanges%2A> method to create a second <xref:System.Data.DataSet> object that is then used to update a data source.
[!code-csharp[Classic WebData DataSet.HasChanges Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.HasChanges Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.HasChanges Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.HasChanges Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="HasChanges">
<MemberSignature Language="C#" Value="public bool HasChanges (System.Data.DataRowState rowStates);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool HasChanges(valuetype System.Data.DataRowState rowStates) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.HasChanges(System.Data.DataRowState)" />
<MemberSignature Language="VB.NET" Value="Public Function HasChanges (rowStates As DataRowState) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool HasChanges(System::Data::DataRowState rowStates);" />
<MemberSignature Language="F#" Value="member this.HasChanges : System.Data.DataRowState -&gt; bool" Usage="dataSet.HasChanges rowStates" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rowStates" Type="System.Data.DataRowState" />
</Parameters>
<Docs>
<param name="rowStates">One of the <see cref="T:System.Data.DataRowState" /> values.</param>
<summary>Gets a value indicating whether the <see cref="T:System.Data.DataSet" /> has changes, including new, deleted, or modified rows, filtered by <see cref="T:System.Data.DataRowState" />.</summary>
<returns>
<see langword="true" /> if the <see cref="T:System.Data.DataSet" /> has changes; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Examine the <xref:System.Data.DataSet.HasChanges%2A> property of the `DataSet` before invoking the <xref:System.Data.DataSet.GetChanges%2A> method.
## Examples
The following example uses the <xref:System.Data.DataSet.GetChanges%2A> method to create a second <xref:System.Data.DataSet> object, which is then used to update a data source.
[!code-csharp[Classic WebData DataSet.GetChanges1 Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.GetChanges1 Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.GetChanges1 Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.GetChanges1 Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="HasErrors">
<MemberSignature Language="C#" Value="public bool HasErrors { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool HasErrors" />
<MemberSignature Language="DocId" Value="P:System.Data.DataSet.HasErrors" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property HasErrors As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool HasErrors { bool get(); };" />
<MemberSignature Language="F#" Value="member this.HasErrors : bool" Usage="System.Data.DataSet.HasErrors" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.Data.DataSysDescription("DataSetHasErrorsDescr")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether there are errors in any of the <see cref="T:System.Data.DataTable" /> objects within this <see cref="T:System.Data.DataSet" />.</summary>
<value>
<see langword="true" /> if any table contains an error; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Each <xref:System.Data.DataTable> in a <xref:System.Data.DataSet> also has a <xref:System.Data.DataTable.HasErrors%2A> property. Use the `HasErrors` property of the `DataSet` first, to determine if any table has errors, before checking individual <xref:System.Data.DataTable> objects. If a `DataTable` has errors, the <xref:System.Data.DataTable.GetErrors%2A> method returns an array of <xref:System.Data.DataRow> objects containing the errors.
## Examples
The following example uses the <xref:System.Data.DataSet.HasErrors%2A> property to determine whether a <xref:System.Data.DataSet> object contains errors. If so, the errors for each <xref:System.Data.DataRow> in each <xref:System.Data.DataTable> are printed.
[!code-csharp[Classic WebData DataSet.HasErrors Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.HasErrors Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.HasErrors Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.HasErrors Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<MemberGroup MemberName="InferXmlSchema">
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Applies XML schema to the <see cref="T:System.Data.DataSet" />.</summary>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</MemberGroup>
<Member MemberName="InferXmlSchema">
<MemberSignature Language="C#" Value="public void InferXmlSchema (System.IO.Stream stream, string[] nsArray);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void InferXmlSchema(class System.IO.Stream stream, string[] nsArray) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.InferXmlSchema(System.IO.Stream,System.String[])" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void InferXmlSchema(System::IO::Stream ^ stream, cli::array &lt;System::String ^&gt; ^ nsArray);" />
<MemberSignature Language="F#" Value="member this.InferXmlSchema : System.IO.Stream * string[] -&gt; unit" Usage="dataSet.InferXmlSchema (stream, nsArray)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stream" Type="System.IO.Stream" />
<Parameter Name="nsArray" Type="System.String[]" />
</Parameters>
<Docs>
<param name="stream">The <see langword="Stream" /> from which to read the schema.</param>
<param name="nsArray">An array of namespace Uniform Resource Identifier (URI) strings to be excluded from schema inference.</param>
<summary>Applies the XML schema from the specified <see cref="T:System.IO.Stream" /> to the <see cref="T:System.Data.DataSet" />.</summary>
<remarks>To be added.</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="InferXmlSchema">
<MemberSignature Language="C#" Value="public void InferXmlSchema (System.IO.TextReader reader, string[] nsArray);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void InferXmlSchema(class System.IO.TextReader reader, string[] nsArray) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.InferXmlSchema(System.IO.TextReader,System.String[])" />
<MemberSignature Language="VB.NET" Value="Public Sub InferXmlSchema (reader As TextReader, nsArray As String())" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void InferXmlSchema(System::IO::TextReader ^ reader, cli::array &lt;System::String ^&gt; ^ nsArray);" />
<MemberSignature Language="F#" Value="member this.InferXmlSchema : System.IO.TextReader * string[] -&gt; unit" Usage="dataSet.InferXmlSchema (reader, nsArray)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="reader" Type="System.IO.TextReader" />
<Parameter Name="nsArray" Type="System.String[]" />
</Parameters>
<Docs>
<param name="reader">The <see langword="TextReader" /> from which to read the schema.</param>
<param name="nsArray">An array of namespace Uniform Resource Identifier (URI) strings to be excluded from schema inference.</param>
<summary>Applies the XML schema from the specified <see cref="T:System.IO.TextReader" /> to the <see cref="T:System.Data.DataSet" />.</summary>
<remarks>To be added.</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="InferXmlSchema">
<MemberSignature Language="C#" Value="public void InferXmlSchema (string fileName, string[] nsArray);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void InferXmlSchema(string fileName, string[] nsArray) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.InferXmlSchema(System.String,System.String[])" />
<MemberSignature Language="VB.NET" Value="Public Sub InferXmlSchema (fileName As String, nsArray As String())" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void InferXmlSchema(System::String ^ fileName, cli::array &lt;System::String ^&gt; ^ nsArray);" />
<MemberSignature Language="F#" Value="member this.InferXmlSchema : string * string[] -&gt; unit" Usage="dataSet.InferXmlSchema (fileName, nsArray)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="fileName" Type="System.String" />
<Parameter Name="nsArray" Type="System.String[]" />
</Parameters>
<Docs>
<param name="fileName">The name of the file (including the path) from which to read the schema.</param>
<param name="nsArray">An array of namespace Uniform Resource Identifier (URI) strings to be excluded from schema inference.</param>
<summary>Applies the XML schema from the specified file to the <see cref="T:System.Data.DataSet" />.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.Security.SecurityException">
<see cref="T:System.Security.Permissions.FileIOPermission" /> is not set to <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Read" />.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">For reading and writing files. Associated enumeration: <see cref="T:System.Security.Permissions.FileIOPermissionAccess" />.</permission>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="InferXmlSchema">
<MemberSignature Language="C#" Value="public void InferXmlSchema (System.Xml.XmlReader reader, string[] nsArray);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void InferXmlSchema(class System.Xml.XmlReader reader, string[] nsArray) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.InferXmlSchema(System.Xml.XmlReader,System.String[])" />
<MemberSignature Language="VB.NET" Value="Public Sub InferXmlSchema (reader As XmlReader, nsArray As String())" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void InferXmlSchema(System::Xml::XmlReader ^ reader, cli::array &lt;System::String ^&gt; ^ nsArray);" />
<MemberSignature Language="F#" Value="member this.InferXmlSchema : System.Xml.XmlReader * string[] -&gt; unit" Usage="dataSet.InferXmlSchema (reader, nsArray)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="reader" Type="System.Xml.XmlReader" />
<Parameter Name="nsArray" Type="System.String[]" />
</Parameters>
<Docs>
<param name="reader">The <see langword="XMLReader" /> from which to read the schema.</param>
<param name="nsArray">An array of namespace Uniform Resource Identifier (URI) strings to be excluded from schema inference.</param>
<summary>Applies the XML schema from the specified <see cref="T:System.Xml.XmlReader" /> to the <see cref="T:System.Data.DataSet" />.</summary>
<remarks>To be added.</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="Initialized">
<MemberSignature Language="C#" Value="public event EventHandler Initialized;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler Initialized" />
<MemberSignature Language="DocId" Value="E:System.Data.DataSet.Initialized" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Initialized As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual event EventHandler ^ Initialized;" />
<MemberSignature Language="F#" Value="member this.Initialized : EventHandler " Usage="member this.Initialized : System.EventHandler " />
<MemberType>Event</MemberType>
<Implements>
<InterfaceMember>E:System.ComponentModel.ISupportInitializeNotification.Initialized</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs after the <see cref="T:System.Data.DataSet" /> is initialized.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For more information, see <xref:System.Data.DataSet.IsInitialized%2A>.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="InitializeDerivedDataSet">
<MemberSignature Language="C#" Value="protected virtual void InitializeDerivedDataSet ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void InitializeDerivedDataSet() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.InitializeDerivedDataSet" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub InitializeDerivedDataSet ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void InitializeDerivedDataSet();" />
<MemberSignature Language="F#" Value="abstract member InitializeDerivedDataSet : unit -&gt; unit&#xA;override this.InitializeDerivedDataSet : unit -&gt; unit" Usage="dataSet.InitializeDerivedDataSet " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Deserialize all of the tables data of the DataSet from the binary or XML stream.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsBinarySerialized">
<MemberSignature Language="C#" Value="protected bool IsBinarySerialized (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance bool IsBinarySerialized(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.IsBinarySerialized(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="VB.NET" Value="Protected Function IsBinarySerialized (info As SerializationInfo, context As StreamingContext) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; bool IsBinarySerialized(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);" />
<MemberSignature Language="F#" Value="member this.IsBinarySerialized : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; bool" Usage="dataSet.IsBinarySerialized (info, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object.</param>
<param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> object.</param>
<summary>Inspects the format of the serialized representation of the <see langword="DataSet" />.</summary>
<returns>
<see langword="true" /> if the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> represents a <see langword="DataSet" /> serialized in its binary format, <see langword="false" /> otherwise.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsInitialized">
<MemberSignature Language="C#" Value="public bool IsInitialized { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsInitialized" />
<MemberSignature Language="DocId" Value="P:System.Data.DataSet.IsInitialized" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsInitialized As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsInitialized { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsInitialized : bool" Usage="System.Data.DataSet.IsInitialized" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.ComponentModel.ISupportInitializeNotification.IsInitialized</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the <see cref="T:System.Data.DataSet" /> is initialized.</summary>
<value>
<see langword="true" /> to indicate the component has completed initialization; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Returns the status of the <xref:System.Data.DataSet> while it's being constructed, for instance by Visual Studio. The <xref:System.Data.DataSet.BeginInit%2A> method sets it to `false` and <xref:System.Data.DataSet.EndInit%2A> method sets it to `true`.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<MemberGroup MemberName="Load">
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Fills a <see cref="T:System.Data.DataSet" /> with values from a data source using the supplied <see cref="T:System.Data.IDataReader" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataTable.Load%2A> method provides a technique for filling a single <xref:System.Data.DataTable> with data, retrieved from an <xref:System.Data.IDataReader> instance. This method provides the same functionality, but allows you to load multiple result sets from an `IDataReader` into multiple tables within a `DataSet`.
If the `DataSet` already contains rows, the incoming data from the data source is merged with the existing rows.
The `Load` method can be used in several common scenarios, all centered around getting data from a specified data source and adding it to the current data container (in this case, a `DataSet`). These scenarios describe standard usage for a `DataSet`, describing its update and merge behavior.
A `DataSet` synchronizes or updates with a single primary data source. The `DataSet` tracks changes, allowing synchronization with the primary data source. In addition, a `DataSet` can accept incremental data from one or more secondary data sources. The `DataSet` isn't responsible for tracking changes in order to allow synchronization with the secondary data source.
Given these two hypothetical data sources, a user is likely to require one of the following behaviors:
- Initialize `DataSet` from a primary data source. In this scenario, the user wants to initialize an empty `DataSet` with values from the primary data source. One or more DataTable's contents are modified. Later the user intends to propagate changes back to the primary data source.
- Preserve changes and re-synchronize from the primary data source. In this scenario, the user wants to take the `DataSet` filled in the previous scenario and perform an incremental synchronization with the primary data source, preserving modifications made in the `DataSet`.
- Incremental data feed from secondary data sources. In this scenario, the user wants to merge changes from one or more secondary data sources, and propagate those changes back to the primary data source.
The `Load` method makes all these scenarios possible. This method allows you to specify a load option parameter, indicating how rows already in a <xref:System.Data.DataTable> combine with rows being loaded. The following table describes the three load options provided by the <xref:System.Data.LoadOption> enumeration. In each case, the description indicates the behavior when the primary key of a row in the incoming data matches the primary key of an existing row.
|Load Option|Description|
|-----------------|-----------------|
|`PreserveChanges` (default)|Updates the original version of the row with the value of the incoming row.|
|`OverwriteChanges`|Updates the current and original versions of the row with the value of the incoming row.|
|`Upsert`|Updates the current version of the row with the value of the incoming row.|
In general, the `PreserveChanges` and `OverwriteChanges` options are intended for scenarios in which the user needs to synchronize the `DataSet` and its changes with the primary data source. The `Upsert` option facilitates aggregating changes from one or more secondary data sources.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</MemberGroup>
<Member MemberName="Load">
<MemberSignature Language="C#" Value="public void Load (System.Data.IDataReader reader, System.Data.LoadOption loadOption, params System.Data.DataTable[] tables);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Load(class System.Data.IDataReader reader, valuetype System.Data.LoadOption loadOption, class System.Data.DataTable[] tables) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.Load(System.Data.IDataReader,System.Data.LoadOption,System.Data.DataTable[])" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Load(System::Data::IDataReader ^ reader, System::Data::LoadOption loadOption, ... cli::array &lt;System::Data::DataTable ^&gt; ^ tables);" />
<MemberSignature Language="F#" Value="member this.Load : System.Data.IDataReader * System.Data.LoadOption * System.Data.DataTable[] -&gt; unit" Usage="dataSet.Load (reader, loadOption, tables)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="reader" Type="System.Data.IDataReader" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="loadOption" Type="System.Data.LoadOption" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="tables" Type="System.Data.DataTable[]" Index="2" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0">
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="reader">An <see cref="T:System.Data.IDataReader" /> that provides one or more result sets.</param>
<param name="loadOption">A value from the <see cref="T:System.Data.LoadOption" /> enumeration that indicates how rows already in the <see cref="T:System.Data.DataTable" /> instances within the <see cref="T:System.Data.DataSet" /> will be combined with incoming rows that share the same primary key.</param>
<param name="tables">An array of <see cref="T:System.Data.DataTable" /> instances, from which the <see cref="M:System.Data.DataSet.Load(System.Data.IDataReader,System.Data.LoadOption,System.Data.DataTable[])" /> method retrieves name and namespace information. Each of these tables must be a member of the <see cref="T:System.Data.DataTableCollection" /> contained by this <see cref="T:System.Data.DataSet" />.</param>
<summary>Fills a <see cref="T:System.Data.DataSet" /> with values from a data source using the supplied <see cref="T:System.Data.IDataReader" />, using an array of <see cref="T:System.Data.DataTable" /> instances to supply the schema and namespace information.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataTable.Load%2A> method provides a technique for filling a single <xref:System.Data.DataTable> with data, retrieved from an <xref:System.Data.IDataReader> instance. This method provides the same functionality, but allows you to load multiple result sets from an <xref:System.Data.IDataReader> into multiple tables within a <xref:System.Data.DataSet>.
> [!NOTE]
> The load operation will fail with an <xref:System.InvalidOperationException> if any of the source data columns in the incoming `reader` are computed columns.
The `loadOption` parameter allows you to specify how you want the imported data to interact with existing data, and can be any of the values from the <xref:System.Data.LoadOption> enumeration. See the documentation for the <xref:System.Data.DataTable><xref:System.Data.DataTable.Load%2A> method for more information on using this parameter.
The `tables` parameter allows you to specify an array of <xref:System.Data.DataTable> instances, indicating the order of the tables corresponding to each result set loaded from the reader. The <xref:System.Data.DataSet.Load%2A> method fills each supplied <xref:System.Data.DataTable> instance with data from a single result set from the source data reader. After each result set, the <xref:System.Data.DataSet.Load%2A> method moves on to the next result set within the reader, until there are no more result sets.
The name resolution scheme for this method is the same as that followed by the <xref:System.Data.Common.DbDataAdapter.Fill%2A> method of the <xref:System.Data.Common.DbDataAdapter> class.
## Examples
The following example creates a new <xref:System.Data.DataSet>, adds two <xref:System.Data.DataTable> instances to the <xref:System.Data.DataSet>, and then fills the <xref:System.Data.DataSet> using the <xref:System.Data.DataSet.Load%2A> method, retrieving data from a <xref:System.Data.DataTableReader> that contains two result sets. Finally, the example displays the contents of the tables in the console window.
[!code-csharp[DataWorks DataSet.LoadTables#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/DataWorks DataSet.LoadTables/CS/source.cs#1)]
[!code-vb[DataWorks DataSet.LoadTables#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks DataSet.LoadTables/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="Load">
<MemberSignature Language="C#" Value="public void Load (System.Data.IDataReader reader, System.Data.LoadOption loadOption, params string[] tables);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Load(class System.Data.IDataReader reader, valuetype System.Data.LoadOption loadOption, string[] tables) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.Load(System.Data.IDataReader,System.Data.LoadOption,System.String[])" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Load(System::Data::IDataReader ^ reader, System::Data::LoadOption loadOption, ... cli::array &lt;System::String ^&gt; ^ tables);" />
<MemberSignature Language="F#" Value="member this.Load : System.Data.IDataReader * System.Data.LoadOption * string[] -&gt; unit" Usage="dataSet.Load (reader, loadOption, tables)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="reader" Type="System.Data.IDataReader" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="loadOption" Type="System.Data.LoadOption" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="tables" Type="System.String[]" Index="2" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0">
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="reader">An <see cref="T:System.Data.IDataReader" /> that provides one or more result sets.</param>
<param name="loadOption">A value from the <see cref="T:System.Data.LoadOption" /> enumeration that indicates how rows already in the <see cref="T:System.Data.DataTable" /> instances within the <see langword="DataSet" /> will be combined with incoming rows that share the same primary key.</param>
<param name="tables">An array of strings, from which the <see langword="Load" /> method retrieves table name information.</param>
<summary>Fills a <see cref="T:System.Data.DataSet" /> with values from a data source using the supplied <see cref="T:System.Data.IDataReader" />, using an array of strings to supply the names for the tables within the <see langword="DataSet" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataTable.Load%2A> method provides a technique for filling a single <xref:System.Data.DataTable> with data, retrieved from an <xref:System.Data.IDataReader> instance. This method provides the same functionality, but allows you to load multiple result sets from an `IDataReader` into multiple tables within a `DataSet`.
> [!NOTE]
> The load operation will fail with an <xref:System.InvalidOperationException> if any of the source data columns in the incoming `reader` are computed columns.
The `loadOption` parameter allows you to specify how you want the imported data to interact with existing data, and can be any of the values from the <xref:System.Data.LoadOption> enumeration. See the documentation for the <xref:System.Data.DataTable.Load%2A> method for more information on using this parameter.
The `tables` parameter allows you to specify an array of table names, indicating the order of the tables corresponding to each result set loaded from the reader. The `Load` method attempts to find a table within the `DataSet` matching the name found in the array of table names, in order. If a matching table is found, that table is loaded with the content of the current result set. If no matching table is found, a table is created using the name supplied in the array of table names, and the new table's schema is inferred from the result set. After each result set, the `Load` method moves on to the next result set within the reader, until there are no more result sets.
The default namespace associated with `DataSet`, if any, is associated with each newly created `DataTable`. The name resolution scheme for this method is the same as that followed by the <xref:System.Data.Common.DbDataAdapter.Fill%2A> method of the <xref:System.Data.Common.DbDataAdapter> class.
## Examples
The following Console application example first creates tables and loads data from a reader into a <xref:System.Data.DataSet>, using the `Load` method. The example then adds tables to a <xref:System.Data.DataSet> and attempts to fill the tables with data from a <xref:System.Data.DataTableReader>. In this example, because the parameters passed to the `Load` method indicate a table name that does not exist, the `Load` method creates a new table to match the name passed as a parameter. Once the data has been loaded, the example displays the contents of all its tables in the Console window.
[!code-csharp[DataWorks DataSet.LoadString#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/DataWorks DataSet.LoadString/CS/source.cs#1)]
[!code-vb[DataWorks DataSet.LoadString#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks DataSet.LoadString/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="Load">
<MemberSignature Language="C#" Value="public virtual void Load (System.Data.IDataReader reader, System.Data.LoadOption loadOption, System.Data.FillErrorEventHandler errorHandler, params System.Data.DataTable[] tables);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Load(class System.Data.IDataReader reader, valuetype System.Data.LoadOption loadOption, class System.Data.FillErrorEventHandler errorHandler, class System.Data.DataTable[] tables) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.Load(System.Data.IDataReader,System.Data.LoadOption,System.Data.FillErrorEventHandler,System.Data.DataTable[])" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Load(System::Data::IDataReader ^ reader, System::Data::LoadOption loadOption, System::Data::FillErrorEventHandler ^ errorHandler, ... cli::array &lt;System::Data::DataTable ^&gt; ^ tables);" />
<MemberSignature Language="F#" Value="abstract member Load : System.Data.IDataReader * System.Data.LoadOption * System.Data.FillErrorEventHandler * System.Data.DataTable[] -&gt; unit&#xA;override this.Load : System.Data.IDataReader * System.Data.LoadOption * System.Data.FillErrorEventHandler * System.Data.DataTable[] -&gt; unit" Usage="dataSet.Load (reader, loadOption, errorHandler, tables)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="reader" Type="System.Data.IDataReader" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="loadOption" Type="System.Data.LoadOption" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="errorHandler" Type="System.Data.FillErrorEventHandler" Index="2" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="tables" Type="System.Data.DataTable[]" Index="3" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0">
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="reader">An <see cref="T:System.Data.IDataReader" /> that provides one or more result sets.</param>
<param name="loadOption">A value from the <see cref="T:System.Data.LoadOption" /> enumeration that indicates how rows already in the <see cref="T:System.Data.DataTable" /> instances within the <see cref="T:System.Data.DataSet" /> will be combined with incoming rows that share the same primary key.</param>
<param name="errorHandler">A <see cref="T:System.Data.FillErrorEventHandler" /> delegate to call when an error occurs while loading data.</param>
<param name="tables">An array of <see cref="T:System.Data.DataTable" /> instances, from which the <see cref="M:System.Data.DataSet.Load(System.Data.IDataReader,System.Data.LoadOption,System.Data.FillErrorEventHandler,System.Data.DataTable[])" /> method retrieves name and namespace information.</param>
<summary>Fills a <see cref="T:System.Data.DataSet" /> with values from a data source using the supplied <see cref="T:System.Data.IDataReader" />, using an array of <see cref="T:System.Data.DataTable" /> instances to supply the schema and namespace information.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataTable.Load%2A> method provides a technique for filling a single <xref:System.Data.DataTable> with data, retrieved from an <xref:System.Data.IDataReader> instance. This method provides the same functionality, but allows you to load multiple result sets from an <xref:System.Data.IDataReader> into multiple tables within a <xref:System.Data.DataSet>.
> [!NOTE]
> The load operation will fail with an <xref:System.InvalidOperationException> if any of the source data columns in the incoming `reader` are computed columns.
The `loadOption` parameter allows you to specify how you want the imported data to interact with existing data, and can be any of the values from the <xref:System.Data.LoadOption> enumeration. See the documentation for the <xref:System.Data.DataTable><xref:System.Data.DataTable.Load%2A> method for more information on using this parameter.
The `errorHandler` parameter is a <xref:System.Data.FillErrorEventHandler> delegate that refers to a procedure that is called when an error occurs while loading data. The <xref:System.Data.FillErrorEventArgs> parameter passed to the procedure provides properties that allow you to retrieve information about the error that occurred, the current row of data, and the <xref:System.Data.DataTable> being filled. Using this delegate mechanism, rather than a simpler try/catch block, allows you to determine the error, handle the situation, and continue processing if you like. The <xref:System.Data.FillErrorEventArgs> parameter supplies a <xref:System.Data.FillErrorEventArgs.Continue%2A> property: set this property to `true` to indicate that you have handled the error and wish to continue processing; set the property to `false` to indicate that you wish to halt processing. Be aware that setting the property to `false` causes the code that triggered the problem to throw an exception.
The `tables` parameter allows you to specify an array of <xref:System.Data.DataTable> instances, indicating the order of the tables corresponding to each result set loaded from the reader. The <xref:System.Data.DataSet.Load%2A> method fills each supplied <xref:System.Data.DataTable> instance with data from a single result set from the source data reader. After each result set, the <xref:System.Data.DataSet.Load%2A> method moves on to the next result set within the reader, until there are no more result sets.
The name resolution scheme for this method is the same as that followed by the <xref:System.Data.Common.DbDataAdapter.Fill%2A> method of the <xref:System.Data.Common.DbDataAdapter> class.
## Examples
The following example adds a table to a <xref:System.Data.DataSet>, and then attempts to use the <xref:System.Data.DataSet.Load%2A> method to load data from a <xref:System.Data.DataTableReader> that contains an incompatible schema. Rather than trapping the error, this example uses a <xref:System.Data.FillErrorEventHandler> delegate to investigate and handle the error. The output is displayed in the console window.
[!code-csharp[DataWorks DataSet.Load#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/DataWorks DataSet.Load/CS/source.cs#1)]
[!code-vb[DataWorks DataSet.Load#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks DataSet.Load/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="Locale">
<MemberSignature Language="C#" Value="public System.Globalization.CultureInfo Locale { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Globalization.CultureInfo Locale" />
<MemberSignature Language="DocId" Value="P:System.Data.DataSet.Locale" />
<MemberSignature Language="VB.NET" Value="Public Property Locale As CultureInfo" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Globalization::CultureInfo ^ Locale { System::Globalization::CultureInfo ^ get(); void set(System::Globalization::CultureInfo ^ value); };" />
<MemberSignature Language="F#" Value="member this.Locale : System.Globalization.CultureInfo with get, set" Usage="System.Data.DataSet.Locale" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.Data.DataSysDescription("DataSetLocaleDescr")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Globalization.CultureInfo</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the locale information used to compare strings within the table.</summary>
<value>A <see cref="T:System.Globalization.CultureInfo" /> that contains data about the user's machine locale. The default is <see langword="null" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataSet.Locale%2A> property specifies the locale for which sorting applies.
By default, setting the <xref:System.Data.DataSet.Locale%2A> for a <xref:System.Data.DataSet> also sets the <xref:System.Data.DataSet.Locale%2A> for each <xref:System.Data.DataTable> object in that `DataSet` to the same value.
> [!NOTE]
> In columns that contain expressions, the <xref:System.StringComparison.InvariantCulture> is used. The <xref:System.StringComparison.CurrentCulture> is ignored.
## Examples
The following example gets the <xref:System.Globalization.CultureInfo> for a <xref:System.Data.DataSet> and prints the <xref:System.Globalization.CultureInfo.DisplayName%2A> and <xref:System.Globalization.CultureInfo.EnglishName%2A> properties.
[!code-vb[Classic WebData DataSet.Locale Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.Locale Example/VB/source.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<MemberGroup MemberName="Merge">
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Merges a specified <see cref="T:System.Data.DataSet" />, <see cref="T:System.Data.DataTable" />, or array of <see cref="T:System.Data.DataRow" /> objects into the current <see langword="DataSet" /> or <see langword="DataTable" />.</summary>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</MemberGroup>
<Member MemberName="Merge">
<MemberSignature Language="C#" Value="public void Merge (System.Data.DataRow[] rows);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Merge(class System.Data.DataRow[] rows) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.Merge(System.Data.DataRow[])" />
<MemberSignature Language="VB.NET" Value="Public Sub Merge (rows As DataRow())" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Merge(cli::array &lt;System::Data::DataRow ^&gt; ^ rows);" />
<MemberSignature Language="F#" Value="member this.Merge : System.Data.DataRow[] -&gt; unit" Usage="dataSet.Merge rows" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rows" Type="System.Data.DataRow[]" />
</Parameters>
<Docs>
<param name="rows">The array of <see langword="DataRow" /> objects to be merged into the <see langword="DataSet" />.</param>
<summary>Merges an array of <see cref="T:System.Data.DataRow" /> objects into the current <see cref="T:System.Data.DataSet" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataSet.Merge%2A> method is used to merge two <xref:System.Data.DataSet> objects that have largely similar schemas. A merge is typically used on a client application to incorporate the latest changes from a data source into an existing <xref:System.Data.DataSet>. This allows the client application to have a refreshed <xref:System.Data.DataSet> with the latest data from the data source.
The <xref:System.Data.DataSet.Merge%2A> method is typically called at the end of a series of procedures that involve validating changes, reconciling errors, updating the data source with the changes, and finally refreshing the existing <xref:System.Data.DataSet>.
In a client application, it is common to have a single button that the user can click that gathers the changed data and validates it before sending it back to a middle-tier component. In this scenario, the <xref:System.Data.DataSet.GetChanges%2A> method is first invoked. That method returns a second <xref:System.Data.DataSet> optimized for validating and merging. This second <xref:System.Data.DataSet> object contains only the <xref:System.Data.DataTable> and <xref:System.Data.DataRow> objects that were changed, resulting in a subset of the original <xref:System.Data.DataSet>. This subset is generally smaller and thus more efficiently passed back to a middle-tier component. The middle-tier component then updates the original data source with the changes through stored procedures. The middle tier can then send back either a new <xref:System.Data.DataSet> that includes original data and the latest data from the data source (by running the original query again), or it can send back the subset with any changes that have been made to it from the data source. (For example, if the data source automatically creates unique primary key values, these values can be propagated back to the client application.) In either case, the returned <xref:System.Data.DataSet> can be merged back into the client application's original <xref:System.Data.DataSet> with the <xref:System.Data.DataSet.Merge%2A> method.
When the <xref:System.Data.DataSet.Merge%2A> method is called, the schemas of the two <xref:System.Data.DataSet> objects are compared because it is possible that the schemas may have been changed. For example, in a business-to-business scenario, new columns may have been added to an XML schema by an automated process. If the source <xref:System.Data.DataSet> contains schema elements (added <xref:System.Data.DataColumn> objects) that are missing in the target, the schema elements can be added to the target by setting the `missingSchemaAction` argument to `MissingSchemaAction.Add`. In that case, the merged <xref:System.Data.DataSet> contains the added schema and data.
After merging schemas, the data is merged.
When merging a new source <xref:System.Data.DataSet> into the target, any source rows with a <xref:System.Data.DataRowState> value of `Unchanged`, `Modified`, or `Deleted` are matched to target rows with the same primary key values. Source rows with a <xref:System.Data.DataRowState> value of `Added` are matched to new target rows with the same primary key values as the new source rows.
During a merge, constraints are disabled. If any constraints cannot be enabled at the end of a merge, a <xref:System.Data.ConstraintException> is generated and the merged data is retained while the constraints are disabled. In this case, the <xref:System.Data.DataSet.EnforceConstraints%2A> property is set to `false`, and all rows that are invalid are marked in error. The errors must be resolved before attempting to reset the <xref:System.Data.DataSet.EnforceConstraints%2A> property to `true`.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="Merge">
<MemberSignature Language="C#" Value="public void Merge (System.Data.DataSet dataSet);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Merge(class System.Data.DataSet dataSet) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.DataSet.Merge(System.Data.DataSet)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Merge(System::Data::DataSet ^ dataSet);" />
<MemberSignature Language="F#" Value="member this.Merge : System.Data.DataSet -&gt; unit" Usage="dataSet.Merge dataSet" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Data.Common</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
</Parameters>
<Docs>
<param name="dataSet">The <see langword="DataSet" /> whose data and schema will be merged.</param>
<summary>Merges a specified <see cref="T:System.Data.DataSet" /> and its schema into the current <see langword="DataSet" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.DataSet.Merge%2A> method is used to merge two <xref:System.Data.DataSet> objects that have largely similar schemas. A merge is typically used on a client application to incorporate the latest changes from a data source into an existing <xref:System.Data.DataSet>. This allows the client application to have a refreshed <xref:System.Data.DataSet> with the latest data from the data source.
The <xref:System.Data.DataSet.Merge%2A> method is typically called at the end of a series of procedures that involve validating changes, reconciling errors, updating the data source with the changes, and finally refreshing the existing <xref:System.Data.DataSet>.
In a client application, it is common to have a single button that the user can click that gathers the changed data and validates it before sending it back to a middle-tier component. In this scenario, the <xref:System.Data.DataSet.GetChanges%2A> method is first invoked. That method returns a second <xref:System.Data.DataSet> optimized for validating and merging. This second <xref:System.Data.DataSet> object contains only the <xref:System.Data.DataTable> and <xref:System.Data.DataRow> objects that were changed, resulting in a subset of the original <xref:System.Data.DataSet>. This subset is generally smaller, and thus more efficiently passed back to a middle-tier component. The middle-tier component then updates the original data source with the changes through stored procedures. The middle tier can then send back either a new <xref:System.Data.DataSet> that includes original data and the latest data from the data source (by running the original query again), or it can send back the subset with any changes that have been made to it from the data source. (For example, if the data source automatically creates unique primary key values, these values can be propagated back to the client application.) In either case, the returned <xref:System.Data.DataSet> can be merged back into the client application's original <xref:System.Data.DataSet> with the <xref:System.Data.DataSet.Merge%2A> method.
When the <xref:System.Data.DataSet.Merge%2A> method is called, the schemas of the two <xref:System.Data.DataSet> objects are compared because it is possible that the schemas may have been changed. For example, in a business-to-business scenario, new columns may have been added to an XML schema by an automated process. If the source <xref:System.Data.DataSet> contains schema elements (added <xref:System.Data.DataColumn> objects) that are missing in the target, the schema elements can be added to the target by setting the `missingSchemaAction` argument to `MissingSchemaAction.Add`. In that case, the merged <xref:System.Data.DataSet> contains the added schema and data.
After merging schemas, the data is merged.
When merging a new source <xref:System.Data.DataSet> into the target, any source rows with a <xref:System.Data.DataRowState> value of `Unchanged`, `Modified`, or `Deleted` are matched to target rows with the same primary key values. Source rows with a `DataRowState` value of `Added` are matched to new target rows with the same primary key values as the new source rows.
During a merge, constraints are disabled. If any constraints cannot be enabled at the end of merge, a <xref:System.Data.ConstraintException> is generated and the merged data is retained while the constraints are disabled. In this case, the <xref:System.Data.DataSet.EnforceConstraints%2A> property is set to `false`, and all rows that are invalid are marked in error. The errors must be resolved before attempting to reset the <xref:System.Data.DataSet.EnforceConstraints%2A> property to `true`.
## Examples
The following example uses the <xref:System.Data.DataSet.GetChanges%2A>, Update, and <xref:System.Data.DataSet.Merge%2A> methods on a <xref:System.Data.DataSet>.
[!code-csharp[Classic WebData DataSet.Merge Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataSet.Merge Example/CS/source.cs#1)]
[!code-vb[Classic WebData DataSet.Merge Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData DataSet.Merge Example/VB/source.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.Data.ConstraintException">One or more constraints cannot be enabled.</exception>
<exception cref="T:System.ArgumentNullException">The <paramref name="dataSet" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Data.ForeignKeyConstraint" />
<altmember cref="M:System.Data.DataSet.GetChanges" />
<altmember cref="T:System.Data.UniqueConstraint" />
<related type="Article" href="~/docs/framework/data/adonet/dataset-datatable-dataview/index.md">Using DataSets in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="Merge">
<MemberSignature Language="C#" Value="public void Merge (System.Data.DataTable table);" />