共用方式為


GraphPathSerializationDictionary.Item 屬性

取得或設定具有指定索引鍵的元素。

命名空間:  Microsoft.VisualStudio.GraphModel
組件:  Microsoft.VisualStudio.GraphModel (在 Microsoft.VisualStudio.GraphModel.dll 中)

語法

'宣告
Public Default Property Item ( _
    key As String _
) As String
public string this[
    string key
] { get; set; }
public:
virtual property String^ default[String^ key] {
    String^ get (String^ key) sealed;
    void set (String^ key, String^ value) sealed;
}
abstract Item : string with get, set
override Item : string with get, set
JScript 不支援索引屬性。

參數

  • key
    型別:System.String
    要取得或設定之項目的索引鍵。

屬性值

型別:System.String
具有指定索引鍵的項目。

實作

IDictionary<TKey, TValue>.Item

例外狀況

例外狀況 條件
ArgumentNullException

key 是 null。

KeyNotFoundException

屬性已擷取,但找不到索引鍵。

NotSupportedException

屬性已設定,而且 System.Collections.Generic.IDictionary 是唯讀的

.NET Framework 安全性

請參閱

參考

GraphPathSerializationDictionary 類別

Microsoft.VisualStudio.GraphModel 命名空間