Method Create
Create<T>(ImmutableArray<T>)
Returns an instance of the ComparerEquatableArray<T> class from the given collection with the default comparer.
Declaration
public static ComparerEquatableArray<T> Create<T>(ImmutableArray<T> items)
Parameters
| Type | Name | Description |
|---|---|---|
| ImmutableArray<T> | items |
Returns
| Type | Description |
|---|---|
| ComparerEquatableArray<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).
Create<T>(IEnumerable<T>)
Returns an instance of the ComparerEquatableArray<T> class from the given collection with the default comparer.
Declaration
public static ComparerEquatableArray<T> Create<T>(IEnumerable<T> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | items |
Returns
| Type | Description |
|---|---|
| ComparerEquatableArray<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).
Create<T>(params ReadOnlySpan<T>)
Returns an instance of the ComparerEquatableArray<T> class from the given collection with the default comparer.
Declaration
public static ComparerEquatableArray<T> Create<T>(params ReadOnlySpan<T> items)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<T> | items |
Returns
| Type | Description |
|---|---|
| ComparerEquatableArray<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).
Create<T>(params T[])
Returns an instance of the ComparerEquatableArray<T> class from the given collection with the default comparer.
Declaration
public static ComparerEquatableArray<T> Create<T>(params T[] items)
Parameters
| Type | Name | Description |
|---|---|---|
| T[] | items |
Returns
| Type | Description |
|---|---|
| ComparerEquatableArray<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).
Create<T>(IEqualityComparer<T>?, ImmutableArray<T>)
Returns an instance of the ComparerEquatableArray<T> class from the given collection with the specified comparer.
Declaration
public static ComparerEquatableArray<T> Create<T>(IEqualityComparer<T>? comparer, ImmutableArray<T> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEqualityComparer<T> | comparer | |
| ImmutableArray<T> | items |
Returns
| Type | Description |
|---|---|
| ComparerEquatableArray<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).
Note: the values for the comparer are compared by reference equality, but with null considered equivalent to Default.
Create<T>(IEqualityComparer<T>?, IEnumerable<T>)
Returns an instance of the ComparerEquatableArray<T> class from the given collection with the specified comparer.
Declaration
public static ComparerEquatableArray<T> Create<T>(IEqualityComparer<T>? comparer, IEnumerable<T> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEqualityComparer<T> | comparer | |
| IEnumerable<T> | items |
Returns
| Type | Description |
|---|---|
| ComparerEquatableArray<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).
Note: the values for the comparer are compared by reference equality, but with null considered equivalent to Default.
Create<T>(IEqualityComparer<T>?, params ReadOnlySpan<T>)
Returns an instance of the ComparerEquatableArray<T> class from the given collection with the specified comparer.
Declaration
public static ComparerEquatableArray<T> Create<T>(IEqualityComparer<T>? comparer, params ReadOnlySpan<T> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEqualityComparer<T> | comparer | |
| ReadOnlySpan<T> | items |
Returns
| Type | Description |
|---|---|
| ComparerEquatableArray<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).
Note: the values for the comparer are compared by reference equality, but with null considered equivalent to Default.
Create<T>(IEqualityComparer<T>?, params T[])
Returns an instance of the ComparerEquatableArray<T> class from the given collection with the specified comparer.
Declaration
public static ComparerEquatableArray<T> Create<T>(IEqualityComparer<T>? comparer, params T[] items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEqualityComparer<T> | comparer | |
| T[] | items |
Returns
| Type | Description |
|---|---|
| ComparerEquatableArray<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).
Note: the values for the comparer are compared by reference equality, but with null considered equivalent to Default.