文档

Unity Engine

Unity Engine

this[]

Gets and sets values by key.
阅读时间1 分钟最后更新于 1 个月前

Definition

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.