ImmutableDictionary<TKey,TValue>.Builder.Item[TKey] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定具有指定索引鍵的專案。
public:
property TValue default[TKey] { TValue get(TKey key); void set(TKey key, TValue value); };
public TValue this[TKey key] { get; set; }
member this.Item('Key) : 'Value with get, set
Default Public Property Item(key As TKey) As TValue
參數
- key
- TKey
要取得或設定的元素。
屬性值
TValue
具有指定鍵的元素。
實作
例外狀況
key 是 null。
該財產正在被取回,但 key 找不到。
屬性正在設定中,且是 IDictionary<TKey,TValue> 唯讀的。