Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


this[]

Gets and sets values by key.
Read time 1 minuteLast updated 8 days ago

Definition

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

this[T]

public TValue this[TKey key] { get; set; }

Parameters

key

T
The key to look up.

Returns

Type

Description

T

Remarks

Getting a key that is not present will throw. Setting a key that is not already present will add the key.