Table of Contents

Class ExtensionMethods

Namespace
Csra
Assembly
Csra.dll
public static class ExtensionMethods
Inheritance
ExtensionMethods
Inherited Members

Methods

SingleOrAt<T>(T[], int)

Returns the single element of a sequence, or the element at the specified index if the sequence contains more than one element.

public static T SingleOrAt<T>(this T[] values, int index)

Parameters

values T[]

The sequence to return an element from.

index int

The zero-based index of the element to retrieve if the sequence contains more than one element.

Returns

T

The single element of the sequence, or the element at the specified index if the sequence contains more than one element.

Type Parameters

T

The type of the elements of the source sequence.