XDocuments2.Count - Propriété
Obtient le nombre d'objets XDocument que contient la collection.
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 XDocuments2
Dim value As Integer
value = instance.Count
int Count { get; }
Valeur de propriété
Type : System.Int32
Implémentations
Remarques
Important
Vous pouvez accéder à ce membre sans restrictions.
Exemples
Dans l'exemple suivant, la propriété Count de la collection XDocuments est utilisée dans une boucle For pour itération dans la collection des objets XDocument et pour afficher une boîte de message indiquant l'emplacement de l'URL (Uniform Resource Identifier) de chaque formulaire ouvert :
for (int i=0; i < thisApplication.XDocuments.Count; i++)
{
thisXDocument.UI.Alert("XDocument URI: " + thisApplication.XDocuments[i].URI);
}
Voir aussi
Référence
Microsoft.Office.Interop.InfoPath.SemiTrust - Espace de noms