Click or drag to resize

EnumerableExtensionsFirstOrT Method

Returns the first 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.3179.0 (4.8.3179.0)
Syntax
C#
public static T FirstOr<T>(
	this IEnumerable<T> org,
	T otherValue
)

Parameters

org  IEnumerableT
The enumeration.
otherValue  T
The other value.

Type Parameters

T
Type of enumerable value.

Return Value

T
First 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 IEnumerableT. 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