DataSourceCollection.Count Property
Gets a count of the number of DataSource objects contained in the DataSourceCollection.
Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
Syntax
'Declaration
'Usage
Property Value
The number of DataSource objects in the DataSourceCollection.
Remarks
This member can be accessed without restrictions.
This type or member can be accessed from code running in forms opened in Microsoft Office InfoPath 2007 or in a Web browser.
Example
In the following example, the Count property of the DataSourceCollection is used to display a count of the number of DataSource objects in the collection.
MessageBox.Show(
"DataSource count: " + this.DataSource.Count.ToString());
MessageBox.Show(
"DataSource count: " & Me.DataSource.Count.ToString())
See Also
Reference
DataSourceCollection Class
DataSourceCollection Members
Microsoft.Office.InfoPath Namespace