ViewInfos.Count - Propriété
Obtient le nombre d'objet ViewInfoObject contenu dans la collection ViewInfosCollection .
Espace de noms : Microsoft.Office.Interop.InfoPath
Assembly : Microsoft.Office.Interop.InfoPath (dans Microsoft.Office.Interop.InfoPath.dll)
Syntaxe
'Déclaration
ReadOnly Property Count As Integer
Get
'Utilisation
Dim instance As ViewInfos
Dim value As Integer
value = instance.Count
int Count { get; }
Valeur de propriété
Type : System.Int32
Exemples
Dans l'exemple qui suit, la propriété Count est utilisée dans une boucle For pour itération dans la collection d'objets ViewInfo et pour afficher une boîte de message indiquant le nom de chaque vue implémentée dans le formulaire :
for (int i=0; i < thisXDocument.ViewInfos.Count; i++)
{
thisXDocument.UI.Alert("View name: " + thisXDocument.ViewInfos[i].Name);
}