# GrapeCity.Enterprise.Data.Expressions.Tools.EnumerableExtensions.SelectWithNext

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Enterprise_Data_Expressions_Tools_EnumerableExtensions_SelectWithNext_" data-uid="GrapeCity.Enterprise.Data.Expressions.Tools.EnumerableExtensions.SelectWithNext*">SelectWithNext Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Enterprise_Data_Expressions_Tools_EnumerableExtensions_SelectWithNext_" data-uid="GrapeCity.Enterprise.Data.Expressions.Tools.EnumerableExtensions.SelectWithNext*"></a>
<h4 id="GrapeCity_Enterprise_Data_Expressions_Tools_EnumerableExtensions_SelectWithNext__2_System_Collections_Generic_IEnumerable___0__System_Func___0___0___1__" data-uid="GrapeCity.Enterprise.Data.Expressions.Tools.EnumerableExtensions.SelectWithNext``2(System.Collections.Generic.IEnumerable{``0},System.Func{``0,``0,``1})">SelectWithNext&lt;TSource, TResult&gt;(IEnumerable&lt;TSource&gt;, Func&lt;TSource, TSource, TResult&gt;)</h4>
<div class="markdown level1 summary"><p>Proceeds each item in enumerable with its follower.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IEnumerable&lt;TResult&gt; SelectWithNext&lt;TSource, TResult&gt;(this IEnumerable&lt;TSource&gt; source, Func&lt;TSource, TSource, TResult&gt; projection)</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.collections.generic.ienumerable-1">IEnumerable</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>Source collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;TSource, TSource, TResult&gt;</td>
      <td><span class="parametername">projection</span></td>
      <td><p>Projection function (x,y) -&gt; z, where x is current item and y is next.</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;TResult&gt;</td>
      <td><p>result of application of a projection function to source</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">TSource</span></td>
      <td><p>Type of collection item.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TResult</span></td>
      <td><p>Type of result collection item.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
