# C1.LiveLinq.LiveViewExtensions.LiveAverage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*">LiveAverage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Int32__" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Int32})">LiveAverage(View&lt;int&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;int, double&gt; LiveAverage(this View&lt;int&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Integer)) As AggregationView(Of Integer, Double)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Int32___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Int32___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Nullable{System.Int32}})">LiveAverage(View&lt;int?&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;int?, double?&gt; LiveAverage(this View&lt;int?&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Integer?)) As AggregationView(Of Integer?, Double?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Int32____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Int32___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, int&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, double&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, int&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Integer))) As AggregationView(Of TSource, Double)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Int32____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Int32____" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int32}}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, int?&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, double?&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, int?&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Integer?))) As AggregationView(Of TSource, Double?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Int32_____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Int64__" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Int64})">LiveAverage(View&lt;long&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;long, double&gt; LiveAverage(this View&lt;long&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Long)) As AggregationView(Of Long, Double)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Int64___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Int64___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Nullable{System.Int64}})">LiveAverage(View&lt;long?&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;long?, double?&gt; LiveAverage(this View&lt;long?&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Long?)) As AggregationView(Of Long?, Double?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>?&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>?, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Int64____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Int64___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int64}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, long&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, double&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, long&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Long))) As AggregationView(Of TSource, Double)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Int64____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Int64____" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int64}}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, long?&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, double?&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, long?&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Long?))) As AggregationView(Of TSource, Double?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>?&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Int64_____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Decimal__" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Decimal})">LiveAverage(View&lt;decimal&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;decimal, decimal&gt; LiveAverage(this View&lt;decimal&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Decimal)) As AggregationView(Of Decimal, Decimal)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Decimal___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Decimal___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Nullable{System.Decimal}})">LiveAverage(View&lt;decimal?&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;decimal?, decimal?&gt; LiveAverage(this View&lt;decimal?&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Decimal?)) As AggregationView(Of Decimal?, Decimal?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>?&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>?, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>?&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Decimal____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Decimal___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Decimal}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, decimal&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, decimal&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, decimal&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Decimal))) As AggregationView(Of TSource, Decimal)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Decimal____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Decimal____" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Decimal}}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, decimal?&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, decimal?&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, decimal?&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Decimal?))) As AggregationView(Of TSource, Decimal?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>?&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>?&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Decimal_____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Double__" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Double})">LiveAverage(View&lt;double&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;double, double&gt; LiveAverage(this View&lt;double&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Double)) As AggregationView(Of Double, Double)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Double___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Double___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Nullable{System.Double}})">LiveAverage(View&lt;double?&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;double?, double?&gt; LiveAverage(this View&lt;double?&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Double?)) As AggregationView(Of Double?, Double?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Double____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Double___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Double}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, double&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, double&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, double&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Double))) As AggregationView(Of TSource, Double)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Double____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Double____" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Double}}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, double?&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, double?&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, double?&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Double?))) As AggregationView(Of TSource, Double?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Double_____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Single__" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Single})">LiveAverage(View&lt;float&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;float, double&gt; LiveAverage(this View&lt;float&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Single)) As AggregationView(Of Single, Double)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a>&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Single___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Single___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage(C1.LiveLinq.LiveViews.View{System.Nullable{System.Single}})">LiveAverage(View&lt;float?&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a> values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;float?, double?&gt; LiveAverage(this View&lt;float?&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(source As View(Of Single?)) As AggregationView(Of Single?, Double?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a>?&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a>?, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;</td>
      <td><p>A view representing the average of the values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage_C1_LiveLinq_LiveViews_View_System_Nullable_System_Single____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty or contains only nulls, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Single___" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Single}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, float&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, double&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, float&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Single))) As AggregationView(Of TSource, Double)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a>&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Single____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a> is thrown.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>


<a id="C1_LiveLinq_LiveViewExtensions_LiveAverage_" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage*"></a>
<h4 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Single____" data-uid="C1.LiveLinq.LiveViewExtensions.LiveAverage``1(C1.LiveLinq.LiveViews.View{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Single}}})">LiveAverage&lt;TSource&gt;(View&lt;TSource&gt;, Expression&lt;Func&lt;TSource, float?&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Computes the average of a view of nullable <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a> values that are obtained
by invoking a transform function on each element of the source view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AggregationView&lt;TSource, double?&gt; LiveAverage&lt;TSource&gt;(this View&lt;TSource&gt; source, Expression&lt;Func&lt;TSource, float?&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function LiveAverage(Of TSource)(source As View(Of TSource), selector As Expression(Of Func(Of TSource, Single?))) As AggregationView(Of TSource, Double?)</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="C1.LiveLinq.LiveViews.View-1.html">View</a>&lt;TSource&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>A view containing the values to calculate the average of.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a>?&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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="C1.LiveLinq.LiveViews.AggregationView-2.html">AggregationView</a>&lt;TSource, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?&gt;</td>
      <td><p>A view representing the average of the values.</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>The type of the elements of <i>source</i>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_LiveViewExtensions_LiveAverage__1_C1_LiveLinq_LiveViews_View___0__System_Linq_Expressions_Expression_System_Func___0_System_Nullable_System_Single_____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <i>source</i> is empty, the average value is null.</p>
<p>It is possible to use standard LINQ query operator <b>Average</b> instead of <b>LiveAverage</b>.
Both are "live" in the sense that they are recomputed automatically when any change occurs in the source.
The difference is that <b>Average</b> will every time loop through the entire source collection and aggregate it from scratch,
whereas <b>LiveAverage</b> will use a more performant algorithm, will maintain its value incrementally,
processing only those source items that actually changed.</p>
</div>
</div>
