DictionaryEntry(Object, Object) 构造函数

定义

使用指定的键和值初始化 DictionaryEntry 类型的实例。Initializes an instance of the DictionaryEntry type with the specified key and value.

public:
 DictionaryEntry(System::Object ^ key, System::Object ^ value);
public DictionaryEntry (object key, object value);
public DictionaryEntry (object key, object? value);
new System.Collections.DictionaryEntry : obj * obj -> System.Collections.DictionaryEntry
Public Sub New (key As Object, value As Object)

参数

key
Object

每个键/值对中定义的对象。The object defined in each key/value pair.

value
Object

key 相关联的定义。The definition associated with key.

例外

keynull,并且 .NET Framework 版本为 1.0 或 1.1。key is null and the .NET Framework version is 1.0 or 1.1.

注解

在 .NET Framework 2.0 key 可以是 nullIn the .NET Framework 2.0 key can be null.

适用于