Click or drag to resize

EnumerableExtensions.LastOr<T> Method

Returns the last value of the enumeration, or, if the enumeration is empty, the other value provided in the arguments.

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3261.0 (4.8.3261.0)
Syntax
C#
public static T LastOr<T>(
	this IEnumerable<T> org,
	T otherValue
)

Parameters

org  IEnumerable<T>
The enumeration.
otherValue  T
The other value.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:Altaxo.Collections.EnumerableExtensions.LastOr``1(System.Collections.Generic.IEnumerable{``0},``0)"]

Return Value

T
Last value of the enumeration, or, if the enumeration is empty, the other value provided in the arguments.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<T>. 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).
See Also