語言

ReadOnlyDictionary<TKey,TValue>.Item[TKey] 屬性

定義

取得具有指定鍵的元素。

public:
 property TValue default[TKey] { TValue get(TKey key); };
public TValue this[TKey key] { get; }
member this.Item('Key) : 'Value
Default Public ReadOnly Property Item(key As TKey) As TValue

參數

key
TKey

關鍵是元素要取得。

屬性值

TValue

具有指定鍵的元素。

實作

例外狀況

key 是 null。

該屬性被檢索,但 key 找不到。

適用於