Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TryGetValue(TKey, out TValue)

Returns the value associated with a key.
Read time 1 minuteLast updated 6 days ago

Definition

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

TryGetValue(T, T)

public bool TryGetValue(TKey key, out TValue item)

Parameters

key

T
The key to look up.

item

T
Outputs the value associated with the key. Outputs default if the key was not present.

Returns

Type

Description

boolTrue if the key was present.