2004-05-01 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
[mono.git] / mcs / class / corlib / System.Collections / DictionaryEntry.cs
1 //
2 // DictionaryEntry.cs
3 //
4 // Authors:
5 //      Paolo Molaro  (lupus@ximian.com)
6 //      Ben Maurer (bmaurer@users.sourceforge.net)
7 //
8 // (C) Ximian, Inc.  http://www.ximian.com
9 // (C) 2003 Ben Maurer
10
11 using System;
12
13 namespace System.Collections {
14
15         [Serializable]
16         public struct DictionaryEntry {
17                 private object key;
18                 private object val;
19
20                 public DictionaryEntry (object key, object value)
21                 {
22                         if (key == null)
23                                 throw new ArgumentNullException ("key");
24                         
25                         this.key = key;
26                         val = value;
27                 }
28                 
29                 public object Key {
30                         get {return key;}
31                         set {
32                                 if (value == null)
33                                         throw new ArgumentNullException ("value");
34                                 key = value;
35                         }
36                 }
37                 public object Value {
38                         get {return val;}
39                         set {val = value;}
40                 }
41         }
42 }