IndexOf

ISummaryZoomSectionCollection.IndexOf méthode

Renvoie un index de l’objet SummaryZoomSection spécifié.

public int IndexOf(ISummaryZoomSection summaryZoomSection)
ParamètreTypeDescription
summaryZoomSectionISummaryZoomSectionObjet SummaryZoomSection à trouver ISummaryZoomSection.

Valeur de retour

Index d’un objet SummaryZoomSection ou -1 si l’objet SummaryZoomSection ne provient pas de cette collection.

Exemples

L’exemple démontre comment obtenir l’élément Summary Zoom Section par index:

[C#]
using (Presentation pres = new Presentation("pres.pptx"))
{
    ISummaryZoomFrame zoomFrame = (ISummaryZoomFrame) pres.Slides[1].Shapes[0];
    ISummaryZoomSectionCollection collection = zoomFrame.SummaryZoomCollection;
    ISummaryZoomSection selectedObject = collection.GetSummarySection(pres.Sections[2]);
    int idx = collection.IndexOf(selectedObject);
}

Voir aussi