# C1.C1Preview.IndexEntry.Occurrences

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_IndexEntry_Occurrences_" data-uid="C1.C1Preview.IndexEntry.Occurrences*">Occurrences Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_IndexEntry_Occurrences_" data-uid="C1.C1Preview.IndexEntry.Occurrences*"></a>
<h4 id="C1_C1Preview_IndexEntry_Occurrences" data-uid="C1.C1Preview.IndexEntry.Occurrences">Occurrences</h4>
<div class="markdown level1 summary"><p>Gets the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List&lt;T&gt;</a> of <a class="xref" href="C1.C1Preview.IndexEntryOccurrence.html">IndexEntryOccurrence</a> objects
representing occurrences of the current index entry in the document.
In the generated index, each occurrence is replaced by the page number,
which is a hyperlink to the occurrence's location in the document.
(Consecutive page numbers are collapsed to ranges.)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public List&lt;IndexEntryOccurrence&gt; Occurrences { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public ReadOnly Property Occurrences As List(Of IndexEntryOccurrence)</code></pre>
</div>
<h5 id="C1_C1Preview_IndexEntry_Occurrences_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method always returns a non-<b>null</b> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List&lt;T&gt;</a>,
creating it if it did not exist.
To test whether an index entry already contains occurrences
without creating the <a class="xref" href="C1.C1Preview.IndexEntry.Occurrences.html#C1_C1Preview_IndexEntry_Occurrences">Occurrences</a> collection,
use the <a class="xref" href="C1.C1Preview.IndexEntry.HasOccurrences.html#C1_C1Preview_IndexEntry_HasOccurrences">HasOccurrences</a> property.</p>
</div>
</div>
