PostSharpAPI ReferencePost­Sharp.​CollectionsLinked­List­ExtensionsTo­Enumerable
Open sandboxFocus

LinkedListExtensions.ToEnumerable Method

ToEnumerable<T>(IReadOnlyLinkedList<T>)

Transforms an IReadOnlyLinkedList<T> into an System.Collections.Generic.IEnumerable<>.

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
System.Collections.Generic.IEnumerable<T>

An System.Collections.Generic.IEnumerable<> 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 System.Collections.Generic.IEnumerable<>.

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

An ReadOnlyLinkedList<T>.

Returns
Type Description
System.Collections.Generic.IEnumerable<T>

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

Type Parameters
Name Description
T

Type of values.