DisposerExtensionsExtractFirstOrDefaultT(T) Method

Finds first element and returns it. Disposes all the rest.

Definition

Namespace: TCX.Configuration
Assembly: 3cxpscomcpp2 (in 3cxpscomcpp2.dll) Version: 20.0.1
C#
public static T ExtractFirstOrDefault<T>(
	this T[] arr
)
where T : IDisposable

Parameters

arr  T
Array of elements

Type Parameters

T

Return Value

T
first element, or default(T) if original array is empty

Usage Note

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