Method ToEquatableArray
ToEquatableArray<T>(ImmutableArray<T>)
Returns an instance of the EquatableArray<T> class from the given collection.
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
Note: values of the collection are assumed to be immutable and interchangeable (that is, the standard equality and hash code contracts must be held, but also must be consistent indefinitely, and the value you read out of the array is only guaranteed to be equal to the one passed in, not necessarily the same instance or bits).
ToEquatableArray<T>(IEnumerable<T>)
Returns an instance of the EquatableArray<T> class from the given collection.
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
Note: values of the collection are assumed to be immutable and interchangeable (that is, the standard equality and hash code contracts must be held, but also must be consistent indefinitely, and the value you read out of the array is only guaranteed to be equal to the one passed in, not necessarily the same instance or bits).
ToEquatableArray<T>(ReadOnlySpan<T>)
Returns an instance of the EquatableArray<T> class from the given collection.
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
Note: values of the collection are assumed to be immutable and interchangeable (that is, the standard equality and hash code contracts must be held, but also must be consistent indefinitely, and the value you read out of the array is only guaranteed to be equal to the one passed in, not necessarily the same instance or bits).
ToEquatableArray<T>(T[])
Returns an instance of the EquatableArray<T> class from the given collection.
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
Note: values of the collection are assumed to be immutable and interchangeable (that is, the standard equality and hash code contracts must be held, but also must be consistent indefinitely, and the value you read out of the array is only guaranteed to be equal to the one passed in, not necessarily the same instance or bits).