Class XapiList
- Namespace
- Xapi
- Assembly
- Xapi.Core.dll
Factory methods for XapiList<T>, usable from C# 9 and as a collection-expression builder.
public static class XapiList
- Inheritance
-
XapiList
- Inherited Members
Methods
CreateRange<T>(IEnumerable<T>)
Creates a list from a sequence.
public static XapiList<T> CreateRange<T>(IEnumerable<T> items)
Parameters
itemsIEnumerable<T>The elements, copied.
Returns
- XapiList<T>
The list.
Type Parameters
TThe element type.
Create<T>(ReadOnlySpan<T>)
Creates a list from a span. This is the collection-expression builder ([a, b]).
public static XapiList<T> Create<T>(ReadOnlySpan<T> items)
Parameters
itemsReadOnlySpan<T>The elements, copied.
Returns
- XapiList<T>
The list.
Type Parameters
TThe element type.
Create<T>(params T[])
Creates a list from the given elements.
public static XapiList<T> Create<T>(params T[] items)
Parameters
itemsT[]The elements, copied.
Returns
- XapiList<T>
The list.
Type Parameters
TThe element type.