Edit

Share via


DataSourceCollection Class

Definition

Contains a collection of DataSource objects that represent the data sources used within a form.

public ref class DataSourceCollection abstract : System::Collections::IEnumerable
public abstract class DataSourceCollection : System.Collections.IEnumerable
type DataSourceCollection = class
    interface IEnumerable
Public MustInherit Class DataSourceCollection
Implements IEnumerable
Inheritance
DataSourceCollection
Implements

Remarks

Each DataSource object in the DataSourceCollection corresponds to data obtained from some external source of data using an associated data connection. The data connection represents the connection to a database or Web service and the data source represents the storage of the returned XML data. The QueryConnection property of the DataSource class provides access to a DataConnection object that represents the particular data connection that was used to connect to the data source.

The DataSourceCollection class implements properties that can be used to access a form's associated DataSource objects, and is accessible through the DataSources property of the XmlForm class.

Note: The DataSourceCollection class can only be used to get the count of DataSource objects that it contains or to return a reference to a DataSource object in the collection. It cannot be used to create, add, or remove DataSource objects.

Constructors

DataSourceCollection()

Properties

Count

Gets a count of the number of DataSource objects contained in the DataSourceCollection.

Item[Int32]

Gets a reference to the specified DataSource object from the DataSourceCollection by index value.

Item[String]

Gets a reference to the specified DataSource object from the DataSourceCollection by name.

Methods

GetEnumerator()

Gets a IEnumerator object that iterates over all entries in the collection.

Applies to