共用方式為


GraphPathSerializationDictionary.ContainsKey 方法

判斷 System.Collections.Generic.IDictionary 是否包含具有指定索引鍵的項目。

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

語法

'宣告
Public Function ContainsKey ( _
    key As String _
) As Boolean
public bool ContainsKey(
    string key
)
public:
virtual bool ContainsKey(
    String^ key
) sealed
abstract ContainsKey : 
        key:string -> bool 
override ContainsKey : 
        key:string -> bool 
public final function ContainsKey(
    key : String
) : boolean

參數

  • key
    型別:System.String
    要在 System.Collections.Generic.IDictionary 中找到的索引鍵。

傳回值

型別:System.Boolean
如果 System.Collections.Generic.IDictionary 包含具有索引鍵的項目,則為 true,否則為 false。

實作

IDictionary<TKey, TValue>.ContainsKey(TKey)

例外狀況

例外狀況 條件
ArgumentNullException

key 是 null。

.NET Framework 安全性

請參閱

參考

GraphPathSerializationDictionary 類別

Microsoft.VisualStudio.GraphModel 命名空間