Class ReadOnlyArray
- Namespace
- LfrlAnvil
- Assembly
- LfrlAnvil.Core.dll
Creates instances of ReadOnlyArray<T> type.
public static class ReadOnlyArray
- Inheritance
-
ReadOnlyArray
- Inherited Members
Methods
Create<T>(T[])
Creates a new ReadOnlyArray<T> instance.
[Pure]
public static ReadOnlyArray<T> Create<T>(T[] source)
Parameters
sourceT[]Underlying Array.
Returns
- ReadOnlyArray<T>
New ReadOnlyArray<T> instance.
Type Parameters
TElement type.
GetUnderlyingType(Type?)
Attempts to extract the underlying type from the provided ReadOnlyArray<T>type.
[Pure]
public static Type? GetUnderlyingType(Type? type)
Parameters
typeTypeType to extract the underlying type from.
Returns
- Type
Underlying ReadOnlyArray<T> type or null when the provided
typeis not related to the ReadOnlyArray<T> type.