# ContainsKey(TKey)

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

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.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. |
