asp.net.ph

DictionaryEntry Structure

System.Collections Namespace


Defines a dictionary key-and-value pair that can be set or retrieved.

DictionaryEntry Class Members

Collapse   Constructors

Visibility Constructor Parameters
public DictionaryEntry ( Object key , Object value )

Collapse   Properties

Visibility Name Value Type Accessibility
public Key Object [ Get , Set ]
public Value Object [ Get , Set ]

Remarks

The IDictionaryEnumerator.Entry method returns an instance of this class.

The foreach statement of the C# language (for each ...next in Visual Basic) requires the type of each element in the collection. Since each element of a collection based on IDictionary is a key-and-value pair, the element type is not the type of the key or the type of the value. Instead, the element type is DictionaryEntry. For example:

foreach ( DictionaryEntry myEntry in myHashtable ) {
   ...
}
  C# VB

Skip Navigation Links



Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph