Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
430 lines (403 sloc) 27.5 KB
<Type Name="Constraint" FullName="System.Data.Constraint">
<TypeSignature Language="C#" Value="public abstract class Constraint" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit Constraint extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Data.Constraint" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class Constraint" />
<TypeSignature Language="C++ CLI" Value="public ref class Constraint abstract" />
<TypeSignature Language="F#" Value="type Constraint = class" />
<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.Object</BaseTypeName>
</Base>
<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("ConstraintName")</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;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-3.0">
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Data.ConstraintConverter))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.Serializable</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a constraint that can be enforced on one or more <see cref="T:System.Data.DataColumn" /> objects.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A constraint is a rule used to maintain the integrity of the data in the <xref:System.Data.DataTable>. For example, when you delete a value that is used in one or more related tables, a <xref:System.Data.ForeignKeyConstraint> determines whether the values in the related tables are also deleted, set to null values, set to default values, or whether no action occurs. A <xref:System.Data.UniqueConstraint>, on the other hand, just makes sure that all values within a particular table are unique. For more information, see [DataTable Constraints](~/docs/framework/data/adonet/dataset-datatable-dataview/datatable-constraints.md).
A base <xref:System.Data.Constraint> constructor is not used. Primary or unique key constraints are created by using the <xref:System.Data.UniqueConstraint> constructor, and foreign key constraints are created by using the <xref:System.Data.ForeignKeyConstraint> constructor.
## Examples
The following example examines the collection of constraints for a <xref:System.Data.DataTable> and determines whether each constraint is a <xref:System.Data.UniqueConstraint> or a <xref:System.Data.ForeignKeyConstraint>. The properties of the constraint are then displayed.
[!code-csharp[Classic WebData Constraint Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData Constraint Example/CS/source.cs#1)]
[!code-vb[Classic WebData Constraint Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData Constraint Example/VB/source.vb#1)]
]]></format>
</remarks>
<threadsafe>This type is safe for multithreaded read operations. You must synchronize any write operations.</threadsafe>
<altmember cref="T:System.Data.ConstraintCollection" />
<altmember cref="P:System.Data.DataTable.Constraints" />
<altmember cref="T:System.Data.ForeignKeyConstraint" />
<altmember cref="T:System.Data.UniqueConstraint" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected Constraint ();" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;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;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;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;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="DocId" Value="M:System.Data.Constraint.#ctor" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;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;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;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;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; Constraint();" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;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;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<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.Constraint" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor is called by derived class constructors to initialize state in this type.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="_DataSet">
<MemberSignature Language="C#" Value="protected virtual System.Data.DataSet _DataSet { get; }" 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" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.DataSet _DataSet" />
<MemberSignature Language="DocId" Value="P:System.Data.Constraint._DataSet" />
<MemberSignature Language="VB.NET" Value="Protected Overridable ReadOnly Property _DataSet As DataSet" 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" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property System::Data::DataSet ^ _DataSet { System::Data::DataSet ^ get(); };" 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" />
<MemberSignature Language="F#" Value="member this._DataSet : System.Data.DataSet" Usage="System.Data.Constraint._DataSet" />
<MemberSignature Language="C#" Value="protected internal virtual System.Data.DataSet _DataSet { get; }" FrameworkAlternate="netframework-1.1" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable ReadOnly Property _DataSet As DataSet" FrameworkAlternate="netframework-1.1" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property System::Data::DataSet ^ _DataSet { System::Data::DataSet ^ get(); };" FrameworkAlternate="netframework-1.1" />
<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.CLSCompliant(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.DataSet</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Data.DataSet" /> to which this constraint belongs.</summary>
<value>The <see cref="T:System.Data.DataSet" /> to which the constraint belongs.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CheckStateForProperty">
<MemberSignature Language="C#" Value="protected void CheckStateForProperty ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void CheckStateForProperty() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.Constraint.CheckStateForProperty" />
<MemberSignature Language="VB.NET" Value="Protected Sub CheckStateForProperty ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void CheckStateForProperty();" />
<MemberSignature Language="F#" Value="member this.CheckStateForProperty : unit -&gt; unit" Usage="constraint.CheckStateForProperty " />
<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>Gets the <see cref="T:System.Data.DataSet" /> to which this constraint belongs.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ConstraintName">
<MemberSignature Language="C#" Value="public virtual string ConstraintName { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ConstraintName" />
<MemberSignature Language="DocId" Value="P:System.Data.Constraint.ConstraintName" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ConstraintName As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ ConstraintName { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.ConstraintName : string with get, set" Usage="System.Data.Constraint.ConstraintName" />
<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("ConstraintNameDescr")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>The name of a constraint in the <see cref="T:System.Data.ConstraintCollection" />.</summary>
<value>The name of the <see cref="T:System.Data.Constraint" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.ConstraintCollection> is returned by the <xref:System.Data.DataTable.Constraints%2A> property of the <xref:System.Data.DataTable> class.
## Examples
The following example iterates through the <xref:System.Data.ConstraintCollection> of a <xref:System.Data.DataTable> and prints each <xref:System.Data.Constraint.ConstraintName%2A>.
[!code-csharp[Classic WebData Constraint.ConstraintName Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData Constraint.ConstraintName Example/CS/source.cs#1)]
[!code-vb[Classic WebData Constraint.ConstraintName Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData Constraint.ConstraintName Example/VB/source.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The <see cref="T:System.Data.Constraint" /> name is a null value or empty string.</exception>
<exception cref="T:System.Data.DuplicateNameException">The <see cref="T:System.Data.ConstraintCollection" /> already contains a <see cref="T:System.Data.Constraint" /> with the same name (The comparison is not case-sensitive.).</exception>
</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.Constraint.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.Constraint.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 user-defined constraint properties.</summary>
<value>A <see cref="T:System.Data.PropertyCollection" /> of custom information.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Extended properties must be of type <xref:System.String>. Properties that are not of type <xref:System.String> are not persisted when the <xref:System.Data.Constraint> is written as XML.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SetDataSet">
<MemberSignature Language="C#" Value="protected internal void SetDataSet (System.Data.DataSet dataSet);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance void SetDataSet(class System.Data.DataSet dataSet) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.Constraint.SetDataSet(System.Data.DataSet)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; void SetDataSet(System::Data::DataSet ^ dataSet);" />
<MemberSignature Language="F#" Value="member this.SetDataSet : System.Data.DataSet -&gt; unit" Usage="constraint.SetDataSet 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 cref="T:System.Data.DataSet" /> to which this constraint will belong.</param>
<summary>Sets the constraint's <see cref="T:System.Data.DataSet" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the <xref:System.Data.Constraint.SetDataSet%2A> method to set the <xref:System.Data.DataSet> for a constraint.
[!code-csharp[Classic WebData Constraint.SetDataSet Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData Constraint.SetDataSet Example/CS/source.cs#1)]
[!code-vb[Classic WebData Constraint.SetDataSet Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData Constraint.SetDataSet Example/VB/source.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Table">
<MemberSignature Language="C#" Value="public abstract System.Data.DataTable Table { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.DataTable Table" />
<MemberSignature Language="DocId" Value="P:System.Data.Constraint.Table" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property Table As DataTable" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract property System::Data::DataTable ^ Table { System::Data::DataTable ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Table : System.Data.DataTable" Usage="System.Data.Constraint.Table" />
<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("ConstraintTableDescr")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.DataTable</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Data.DataTable" /> to which the constraint applies.</summary>
<value>A <see cref="T:System.Data.DataTable" /> to which the constraint applies.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example returns the <xref:System.Data.DataTable> of a <xref:System.Data.Constraint>.
[!code-csharp[Classic WebData Constraint.Table Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData Constraint.Table Example/CS/source.cs#1)]
[!code-vb[Classic WebData Constraint.Table Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData Constraint.Table Example/VB/source.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.Constraint.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::String ^ ToString();" />
<MemberSignature Language="F#" Value="override this.ToString : unit -&gt; string" Usage="constraint.ToString " />
<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>Gets the <see cref="P:System.Data.Constraint.ConstraintName" />, if there is one, as a string.</summary>
<returns>The string value of the <see cref="P:System.Data.Constraint.ConstraintName" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example returns the <xref:System.Data.Constraint.ConstraintName%2A> using the <xref:System.Data.Constraint.ToString%2A> method.
[!code-csharp[Classic WebData Constraint.ToString Example#1](~/samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData Constraint.ToString Example/CS/source.cs#1)]
[!code-vb[Classic WebData Constraint.ToString Example#1](~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData Constraint.ToString Example/VB/source.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.