DataObjects.Count - Propriété
Obtient le nombre d'objets DataSourceObject contenus dans la collection DataObjectsCollection.
Espace de noms : Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly : Microsoft.Office.Interop.InfoPath.SemiTrust (dans Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntaxe
'Déclaration
ReadOnly Property Count As Integer
Get
'Utilisation
Dim instance As DataObjects
Dim value As Integer
value = instance.Count
int Count { get; }
Valeur de propriété
Type : System.Int32
Remarques
Important
Vous pouvez accéder à ce membre sans restrictions.
Exemples
Dans l'exemple suivant, la propriété Count est utilisée dans une boucle For pour itération dans la collection d'objets DataObject et pour afficher une alerte indiquant le nom de chaque objet DataObject associé au formulaire :
for (int i=0; i < thisXDocument.DataObjects.Count; i++)
{
DataObject thisDataAdapter = thisXDocument.DataObjects[i];
thisXDocument.UI.Alert("DataObject name: " + thisDataAdapter.Name);
}
Voir aussi
Référence
Microsoft.Office.Interop.InfoPath.SemiTrust - Espace de noms