# GrapeCity.Win.Spread.InputMan.CellType.CollectionBase-1.FindLast

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Win_Spread_InputMan_CellType_CollectionBase_1_FindLast_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.CollectionBase`1.FindLast*">FindLast Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Win_Spread_InputMan_CellType_CollectionBase_1_FindLast_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.CollectionBase`1.FindLast*"></a>
<h4 id="GrapeCity_Win_Spread_InputMan_CellType_CollectionBase_1_FindLast__1" data-uid="GrapeCity.Win.Spread.InputMan.CellType.CollectionBase`1.FindLast``1">FindLast&lt;TTarget&gt;()</h4>
<div class="markdown level1 summary"><p>Searches for an <code class="typeparamref">T</code> that matches the specified type TTarget and  matches the conditions defined by the specified predicate,
and returns the last occurrence within the entire collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TTarget FindLast&lt;TTarget&gt;() where TTarget : T</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function FindLast(Of TTarget As T)() As TTarget</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">TTarget</span></td>
      <td><p>The last <code class="typeparamref">T</code> that matches the conditions defined by the specified predicate, if found;
otherwise, the default value for type TTarget.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">TTarget</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Win_Spread_InputMan_CellType_CollectionBase_1_FindLast_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.CollectionBase`1.FindLast*"></a>
<h4 id="GrapeCity_Win_Spread_InputMan_CellType_CollectionBase_1_FindLast__1_System_Predicate___0__" data-uid="GrapeCity.Win.Spread.InputMan.CellType.CollectionBase`1.FindLast``1(System.Predicate{``0})">FindLast&lt;TTarget&gt;(Predicate&lt;TTarget&gt;)</h4>
<div class="markdown level1 summary"><p>Searches for an <code class="typeparamref">T</code> that matches the specified type TTarget and  matches the conditions defined by the specified predicate,
and returns the last occurrence within the entire collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TTarget FindLast&lt;TTarget&gt;(Predicate&lt;TTarget&gt; match) where TTarget : T</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function FindLast(Of TTarget As T)(match As Predicate(Of TTarget)) As TTarget</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.predicate-1">Predicate</a>&lt;TTarget&gt;</td>
      <td><span class="parametername">match</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.predicate-1">Predicate&lt;T&gt;</a> delegate that defines the conditions of the <code class="typeparamref">T</code> to search for.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">TTarget</span></td>
      <td><p>The last <code class="typeparamref">T</code> that matches the conditions defined by the specified predicate, if found;
otherwise, the default value for type TTarget.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">TTarget</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
      <td><p>match is null.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
