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

  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. ** Class:  KeyValuePairs
  18. **
  19. **
  20. ** Purpose: KeyValuePairs to display items in collection class under debugger
  21. **
  22. **
  23. ===========================================================*/
  24. namespace System.Collections
  25. {
  26.     using System.Diagnostics;
  27.    
  28.     [DebuggerDisplay("{value}", Name = "[{key}]", Type = "")]
  29.     internal class KeyValuePairs
  30.     {
  31.         [DebuggerBrowsable(DebuggerBrowsableState.Never)]
  32.         private object key;
  33.        
  34.         [DebuggerBrowsable(DebuggerBrowsableState.Never)]
  35.         private object value;
  36.        
  37.         public KeyValuePairs(object key, object value)
  38.         {
  39.             this.value = value;
  40.             this.key = key;
  41.         }
  42.        
  43.         public object Key {
  44.             get { return key; }
  45.         }
  46.        
  47.         public object Value {
  48.             get { return value; }
  49.         }
  50.     }
  51. }

Developer Fusion