// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Interface: DictionaryEntry
**
**
** Purpose: Return Value for IDictionaryEnumerator::GetEntry
**
** Date: September 20, 1999
**
===========================================================*/
namespace System.Collections {
using System;
// A DictionaryEntry holds a key and a value from a dictionary.
// It is returned by IDictionaryEnumerator::GetEntry().
//|
public struct DictionaryEntry
{
//|
private Object _key;
//|
private Object _value;
// Constructs a new DictionaryEnumerator by setting the Key
// and Value fields appropriately.
//
//|
public DictionaryEntry(Object key, Object value)
{
if (key==null)
throw new ArgumentNullException("key");
_key = key;
_value = value;
}
//|
public Object Key
{
get
{
return _key;
}
set {
if (value == null)
throw new ArgumentNullException("value");
_key = value;
}
}
//|
public Object Value
{
get {
return _value;
}
set {
_value = value;
}
}
}
}