asp.net.ph

DataRelationCollection.Item Property

System.Data Namespace   DataRelationCollection Class


Returns the specified DataRelation from the collection.

Overload List

1. Returns the DataRelation at the specified index in the collection.

2. Returns the DataRelation from the collection with the specified name.


Example

The following example uses the Item property to print the names of all DataRelation objects in the collection, each specified by index.

NOTE: This example shows how to use one of the overloaded versions of the Item property ( DataRelationCollection indexer ). For other examples that may be available, see the individual overload topics.

private void PrintRelationNamesByIndex ( DataSet ds ) {
    // get the DataRelationCollection from a DataSet.
   DataRelationCollection relations = ds.Relations;
   // print each relation's name using the index.
   for ( int i = 0; i < relations.Count; i++ ) {
      Response.Write ( relations [ ] );
   }
}
  C# VB

See Also

DataRelationCollection Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph