Open sandboxFocus

Method ToEnumerable

ToEnumerable<T>(IReadOnlyLinkedList<T>)

Transforms an IReadOnlyLinkedList<T> into an IEnumerable<T>.

Declaration
public static IEnumerable<T> ToEnumerable<T>(IReadOnlyLinkedList<T> linkedList)
Parameters
Type Name Description
IReadOnlyLinkedList<T> linkedList

A IReadOnlyLinkedList<T>, or null.

Returns
Type Description
IEnumerable<T>

An IEnumerable<T> that can enumerate all elements in linkedList. If linkedList is null, an empty enumerable is returned.

Type Parameters
Name Description
T

Type of values.

ToEnumerable<T>(ReadOnlyLinkedList<T>)

Transforms a ReadOnlyLinkedList<T> into an IEnumerable<T>.

Declaration
public static IEnumerable<T> ToEnumerable<T>(ReadOnlyLinkedList<T> linkedList)
Parameters
Type Name Description
ReadOnlyLinkedList<T> linkedList

An ReadOnlyLinkedList<T>.

Returns
Type Description
IEnumerable<T>

An IEnumerable<T> that can enumerate all elements in linkedList. If linkedList is null, an empty enumerable is returned.

Type Parameters
Name Description
T

Type of values.