MoreEnumerableAggregateRightTSource(IEnumerableTSource, FuncTSource, TSource, TSource) Method
Namespace: MoreLinqAssembly: MoreLinq (in MoreLinq.dll) Version: 4.4.0+6d97c3b1d482f98300f4446df14742b0e3fafbec
public static TSource AggregateRight<TSource>(
	this IEnumerable<TSource> source,
	Func<TSource, TSource, TSource> func
)
<ExtensionAttribute>
Public Shared Function AggregateRight(Of TSource) ( 
	source As IEnumerable(Of TSource),
	func As Func(Of TSource, TSource, TSource)
) As TSource
public:
[ExtensionAttribute]
generic<typename TSource>
static TSource AggregateRight(
	IEnumerable<TSource>^ source, 
	Func<TSource, TSource, TSource>^ func
)
[<ExtensionAttribute>]
static member AggregateRight : 
        source : IEnumerable<'TSource> * 
        func : Func<'TSource, 'TSource, 'TSource> -> 'TSource 
- source  IEnumerableTSource
- Source sequence.
- func  FuncTSource, TSource, TSource
- A right-associative accumulator function to be invoked on each element.
- TSource
- The type of the elements of source.
TSourceThe final accumulator value.In Visual Basic and C#, you can call this method as an instance method on any object of type 
IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see 
Extension Methods (Visual Basic) or 
Extension Methods (C# Programming Guide).
 
            This operator executes immediately.
            
string result = Enumerable.Range(1, 5).Select(i => i.ToString()).AggregateRight((a, b) => $"({a}/{b})");
            The 
result variable will contain 
"(1/(2/(3/(4/5))))".