---
title: ContainsKey(TKey)
product: Unity Editor
version: '6000.7'
latest_version: '7000.0'
status: This page documents version 6000.7. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelmultihashmap2/readonly/containskey
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelmultihashmap2/readonly/containskey.md
last_updated: 2026-09-14
generated_at: 2026-11-18T09:14:30.638Z
locale: en-us
---

# ContainsKey(TKey)

> Returns true if a given key is present in this hash map.

## Definition

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

## ContainsKey(T)

```csharp
public readonly bool ContainsKey(TKey key)
```

### Parameters

**** (T): The key to look up.

### Returns

| Type                                                          | Description                  |
| ------------------------------------------------------------- | ---------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the key was present. |
