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 命名空间