Method ToEquatableArray
ToEquatableArray<T>(ImmutableArray<T>)
Returns an EquatableArray<T> containing the specified items.
Declaration
public static EquatableArray<T> ToEquatableArray<T>(this ImmutableArray<T> value)
Parameters
| Type | Name | Description |
|---|---|---|
| ImmutableArray<T> | value |
Returns
| Type | Description |
|---|---|
| EquatableArray<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
The values in the array are assumed to be immutable and interchangeable. Equal values must stay equal and keep the same hash code indefinitely, and a value read from the array is only guaranteed to be equal to the one that was passed in, not to be the same instance.
ToEquatableArray<T>(IEnumerable<T>)
Returns an EquatableArray<T> containing the specified items.
Declaration
public static EquatableArray<T> ToEquatableArray<T>(this IEnumerable<T> value)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | value |
Returns
| Type | Description |
|---|---|
| EquatableArray<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
The values in the array are assumed to be immutable and interchangeable. Equal values must stay equal and keep the same hash code indefinitely, and a value read from the array is only guaranteed to be equal to the one that was passed in, not to be the same instance.
ToEquatableArray<T>(ReadOnlySpan<T>)
Returns an EquatableArray<T> containing the specified items.
Declaration
public static EquatableArray<T> ToEquatableArray<T>(this ReadOnlySpan<T> value)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<T> | value |
Returns
| Type | Description |
|---|---|
| EquatableArray<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
The values in the array are assumed to be immutable and interchangeable. Equal values must stay equal and keep the same hash code indefinitely, and a value read from the array is only guaranteed to be equal to the one that was passed in, not to be the same instance.
ToEquatableArray<T>(T[])
Returns an EquatableArray<T> containing the specified items.
Declaration
public static EquatableArray<T> ToEquatableArray<T>(this T[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| T[] | value |
Returns
| Type | Description |
|---|---|
| EquatableArray<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
The values in the array are assumed to be immutable and interchangeable. Equal values must stay equal and keep the same hash code indefinitely, and a value read from the array is only guaranteed to be equal to the one that was passed in, not to be the same instance.