ImmutableArray<T>.Remove 方法

定义

重载

Remove(T)

返回一个数组,其中包含已从数组中移除的指定元素的第一个匹配项。Returns an array with the first occurrence of the specified element removed from the array. 如果未找到匹配项,则返回当前的数组。If no match is found, the current array is returned.

Remove(T, IEqualityComparer<T>)

返回一个数组,其中包含已从数组中移除的指定元素的第一个匹配项。Returns an array with the first occurrence of the specified element removed from the array.

如果未找到匹配项,则返回当前的数组。If no match is found, the current array is returned.

Remove(T)

返回一个数组,其中包含已从数组中移除的指定元素的第一个匹配项。Returns an array with the first occurrence of the specified element removed from the array. 如果未找到匹配项,则返回当前的数组。If no match is found, the current array is returned.

public:
 System::Collections::Immutable::ImmutableArray<T> Remove(T item);
public System.Collections.Immutable.ImmutableArray<T> Remove (T item);
member this.Remove : 'T -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Remove (item As T) As ImmutableArray(Of T)

参数

item
T

要移除的项。The item to remove.

返回

已移除项的新数组。A new array with the item removed.

Remove(T, IEqualityComparer<T>)

返回一个数组,其中包含已从数组中移除的指定元素的第一个匹配项。Returns an array with the first occurrence of the specified element removed from the array.

如果未找到匹配项,则返回当前的数组。If no match is found, the current array is returned.

public:
 System::Collections::Immutable::ImmutableArray<T> Remove(T item, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public System.Collections.Immutable.ImmutableArray<T> Remove (T item, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
member this.Remove : 'T * System.Collections.Generic.IEqualityComparer<'T> -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Remove (item As T, equalityComparer As IEqualityComparer(Of T)) As ImmutableArray(Of T)

参数

item
T

要移除的项。The item to remove.

equalityComparer
IEqualityComparer<T>

要在搜索中使用的相等性比较器。The equality comparer to use in the search.

返回

已移除指定项的新数组。A new array with the specified item removed.

适用于