The Labs \ Source Viewer \ SSCLI \ System.Collections \ DictionaryEntry

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Interface:  DictionaryEntry
  18. **
  19. **
  20. ** Purpose: Return Value for IDictionaryEnumerator::GetEntry
  21. **
  22. **
  23. ===========================================================*/
  24. namespace System.Collections
  25. {
  26.    
  27.     using System;
  28.     // A DictionaryEntry holds a key and a value from a dictionary.
  29.     // It is returned by IDictionaryEnumerator::GetEntry().
  30.     [System.Runtime.InteropServices.ComVisible(true)]
  31.     [Serializable()]
  32.     public struct DictionaryEntry
  33.     {
  34.         private object _key;
  35.         private object _value;
  36.        
  37.         // Constructs a new DictionaryEnumerator by setting the Key
  38.         // and Value fields appropriately.
  39.         public DictionaryEntry(object key, object value)
  40.         {
  41.             _key = key;
  42.             _value = value;
  43.         }
  44.        
  45.         public object Key {
  46.             get { return _key; }
  47.            
  48.             set { _key = value; }
  49.         }
  50.        
  51.         public object Value {
  52.             get { return _value; }
  53.            
  54.             set { _value = value; }
  55.         }
  56.     }
  57. }

Developer Fusion