DataRelationCollection.Item[] Property

Definition

Gets the specified DataRelation from the collection.

Overloads

Item[Int32]

Gets the DataRelation object at the specified index.

Item[String]

Gets the DataRelation object specified by name.

Item[Int32]

Source:
DataRelationCollection.cs
Source:
DataRelationCollection.cs
Source:
DataRelationCollection.cs

Gets the DataRelation object at the specified index.

C#
public abstract System.Data.DataRelation this[int index] { get; }

Parameters

index
Int32

The zero-based index to find.

Property Value

The DataRelation, or a null value if the specified DataRelation does not exist.

Exceptions

The index value is greater than the number of items in the collection.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Item[String]

Source:
DataRelationCollection.cs
Source:
DataRelationCollection.cs
Source:
DataRelationCollection.cs

Gets the DataRelation object specified by name.

C#
public abstract System.Data.DataRelation? this[string? name] { get; }
C#
public abstract System.Data.DataRelation this[string name] { get; }

Parameters

name
String

The name of the relation to find.

Property Value

The named DataRelation, or a null value if the specified DataRelation does not exist.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1