Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Add(TKey, TValue)

Adds a new key-value pair.
Read time 1 minuteLast updated 7 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

Add(T, T)

public void Add(TKey key, TValue item)

Parameters

key

T
The key to add.

item

T
The value to add.

Remarks

If the key is already present, this method throws without modifying the hash map.