Export (0) Print
Expand All

DataRelationCollection Class

Represents the collection of DataRelation objects for this DataSet.

Namespace:  System.Data
Assembly:  System.Data (in System.Data.dll)

'Declaration
Public MustInherit Class DataRelationCollection _
	Inherits InternalDataCollectionBase

The DataRelationCollection type exposes the following members.

  NameDescription
Protected methodSupported by the XNA FrameworkDataRelationCollectionInitializes a new instance of the DataRelationCollection class.
Top

  NameDescription
Public propertySupported by the XNA FrameworkCountGets the total number of elements in a collection. (Inherited from InternalDataCollectionBase.)
Public propertySupported by the XNA FrameworkIsReadOnlyGets a value that indicates whether the InternalDataCollectionBase is read-only. (Inherited from InternalDataCollectionBase.)
Public propertySupported by the XNA FrameworkIsSynchronizedGets a value that indicates whether the InternalDataCollectionBase is synchonized. (Inherited from InternalDataCollectionBase.)
Public propertySupported by the XNA FrameworkItem(Int32)Gets the DataRelation object at the specified index.
Public propertySupported by the XNA FrameworkItem(String)Gets the DataRelation object specified by name.
Protected propertySupported by the XNA FrameworkListGets the items of the collection as a list. (Inherited from InternalDataCollectionBase.)
Public propertySupported by the XNA FrameworkSyncRootGets an object that can be used to synchronize the collection. (Inherited from InternalDataCollectionBase.)
Top

  NameDescription
Public methodSupported by the XNA FrameworkAdd(DataRelation)Adds a DataRelation to the DataRelationCollection.
Public methodSupported by the XNA FrameworkAdd(DataColumn, DataColumn)Creates a DataRelation with a specified parent and child column, and adds it to the collection.
Public methodSupported by the XNA FrameworkAdd(DataColumn(), DataColumn())Creates a DataRelation with the specified parent and child columns, and adds it to the collection.
Public methodSupported by the XNA FrameworkAdd(String, DataColumn, DataColumn)Creates a DataRelation with the specified name, and parent and child columns, and adds it to the collection.
Public methodSupported by the XNA FrameworkAdd(String, DataColumn(), DataColumn())Creates a DataRelation with the specified name and arrays of parent and child columns, and adds it to the collection.
Public methodSupported by the XNA FrameworkAdd(String, DataColumn, DataColumn, Boolean)Creates a DataRelation with the specified name, parent and child columns, with optional constraints according to the value of the createConstraints parameter, and adds it to the collection.
Public methodSupported by the XNA FrameworkAdd(String, DataColumn(), DataColumn(), Boolean)Creates a DataRelation with the specified name, arrays of parent and child columns, and value specifying whether to create a constraint, and adds it to the collection.
Protected methodSupported by the XNA FrameworkAddCorePerforms verification on the table.
Public methodSupported by the XNA FrameworkAddRangeCopies the elements of the specified DataRelation array to the end of the collection.
Public methodSupported by the XNA FrameworkCanRemoveVerifies whether the specified DataRelation can be removed from the collection.
Public methodSupported by the XNA FrameworkClearClears the collection of any relations.
Public methodSupported by the XNA FrameworkContainsVerifies whether a DataRelation with the specific name (case insensitive) exists in the collection.
Public methodSupported by the XNA FrameworkCopyTo(Array, Int32)Copies all the elements of the current InternalDataCollectionBase to a one-dimensional Array, starting at the specified InternalDataCollectionBase index. (Inherited from InternalDataCollectionBase.)
Public methodSupported by the XNA FrameworkCopyTo(DataRelation(), Int32)Copies the collection of DataRelation objects starting at the specified index.
Public methodSupported by the XNA FrameworkEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkGetDataSetInfrastructure. This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Public methodSupported by the XNA FrameworkGetEnumeratorGets an IEnumerator for the collection. (Inherited from InternalDataCollectionBase.)
Public methodSupported by the XNA FrameworkGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported by the XNA FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported by the XNA FrameworkIndexOf(DataRelation)Gets the index of the specified DataRelation object.
Public methodSupported by the XNA FrameworkIndexOf(String)Gets the index of the DataRelation specified by name.
Protected methodSupported by the XNA FrameworkMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkOnCollectionChangedRaises the CollectionChanged event.
Protected methodSupported by the XNA FrameworkOnCollectionChangingRaises the CollectionChanged event.
Public methodSupported by the XNA FrameworkRemove(DataRelation)Removes the specified relation from the collection.
Public methodSupported by the XNA FrameworkRemove(String)Removes the relation with the specified name from the collection.
Public methodSupported by the XNA FrameworkRemoveAtRemoves the relation at the specified index from the collection.
Protected methodSupported by the XNA FrameworkRemoveCorePerforms a verification on the specified DataRelation object.
Public methodSupported by the XNA FrameworkToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public eventSupported by the XNA FrameworkCollectionChangedOccurs when the collection has changed.
Top

A DataRelationCollection object enables navigation between related parent/child DataTable objects.

You create a DataRelationCollection object by defining it as a property of either the DataSet or the DataTable, instead of by directly using a constructor. (Use the Relations property of the DataSet, or the ParentRelations property of the DataTable.)

To access the collection, use the Relations property of the DataSet object.

As soon as the collection exists you can manage the objects it contains by using methods such as Add, Clear, and Remove.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

This type is safe for multithreaded read operations. You must synchronize any write operations.

Show:
© 2014 Microsoft