# Remove

> Removes a key and its associated value(s).

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## Remove(T)

Removes a key and its associated value(s).

```csharp
public int Remove(TKey key)
```

### Parameters

**** (T): The key to remove.

### Returns

| Type                                                       | Description                                                                   |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of removed key-value pairs. If the key was not present, returns 0. |

## Remove\<T>(T, T)

Removes all key-value pairs with a particular key and a particular value.

```csharp
public void Remove<TValueEQ>(TKey key, TValueEQ value) where TValueEQ : unmanaged, IEquatable<TValueEQ>
```

### Parameters

**** (T): The key of the key-value pairs to remove.**** (T): The value of the key-value pairs to remove.

### Remarks

Removes all key-value pairs which have a particular key and which "also have" a particular value. In other words: (key "AND" value) rather than (key "OR" value).

## Remove(NativeParallelMultiHashMapIterator\<T>)

Removes a single key-value pair.

```csharp
public void Remove(NativeParallelMultiHashMapIterator<TKey> it)
```

### Parameters

**** (\[NativeParallelMultiHashMapIterator\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelmultihashmapiterator1)): An iterator representing the key-value pair to remove.
