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
source
T[]Underlying Array.
Returns
- ReadOnlyArray<T>
New ReadOnlyArray<T> instance.
Type Parameters
T
Element type.
GetUnderlyingType(Type?)
Attempts to extract the underlying type from the provided ReadOnlyArray<T>type
.
[Pure]
public static Type? GetUnderlyingType(Type? type)
Parameters
type
TypeType to extract the underlying type from.
Returns
- Type
Underlying ReadOnlyArray<T> type or null when the provided
type
is not related to the ReadOnlyArray<T> type.