System.Collections.DictionaryEntry Structure

public struct DictionaryEntry

Base Types

Object
  ValueType
    DictionaryEntry

Assembly

mscorlib

Library

BCL

Summary

Represents a dictionary entry consisting of a System.Collections.DictionaryEntry.Key and an associated System.Collections.DictionaryEntry.Value.

Description

[Note: Some types that manage or access collections of objects, such as Hashtable and IDictionaryEnumerator, rely on the use of one or more pairs of a key object and an associated value object. DictionaryEntry provides this functionality.

This structure supports the C# foreach semantics for Hashtable.

]

See Also

System.Collections Namespace

Members

DictionaryEntry Constructors

DictionaryEntry Constructor

DictionaryEntry Properties

DictionaryEntry.Key Property
DictionaryEntry.Value Property


DictionaryEntry Constructor

public DictionaryEntry(object key, object value);

Summary

Constructs and initializes a new instance of the DictionaryEntry class with the specified key and value objects.

Parameters

key
The Object defined to reference a dictionary entry.
value
The Object that contains the content associated with key.

Exceptions

Exception TypeCondition
ArgumentNullExceptionkey is null .

See Also

System.Collections.DictionaryEntry Structure, System.Collections Namespace

DictionaryEntry.Key Property

public object Key { get; set; }

Summary

Gets or sets an object representing the key of the current DictionaryEntry .

Property Value

A Object representing the key of the current DictionaryEntry .

See Also

System.Collections.DictionaryEntry Structure, System.Collections Namespace

DictionaryEntry.Value Property

public object Value { get; set; }

Summary

Gets or sets an object representing the content of the current DictionaryEntry .

Property Value

A Object representing the content of the current DictionaryEntry .

See Also

System.Collections.DictionaryEntry Structure, System.Collections Namespace