# KVPair<TKey, TValue>

> A key-value pair.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public struct KVPair<TKey, TValue> where TKey : unmanaged, IEquatable<TKey> where TValue : unmanaged
```

## Remarks

Used for enumerators.

## Properties

| Property                                                                    | Description              |
| --------------------------------------------------------------------------- | ------------------------ |
| [Key](/engine/6000.7/script-reference/unity/collections/kvpair2/key.md)     | The key.                 |
| [Value](/engine/6000.7/script-reference/unity/collections/kvpair2/value.md) | Value of key/value pair. |

## Static Properties

| Property                                                                  | Description          |
| ------------------------------------------------------------------------- | -------------------- |
| [Null](/engine/6000.7/script-reference/unity/collections/kvpair2/null.md) | An invalid KeyValue. |

## Methods

| Method                                                                                  | Description                 |
| --------------------------------------------------------------------------------------- | --------------------------- |
| [GetKeyValue](/engine/6000.7/script-reference/unity/collections/kvpair2/getkeyvalue.md) | Gets the key and the value. |
