2008-02-25 Robert Jordan <robertj@gmx.net>
authorRobert Jordan <robertj@gmx.net>
Mon, 25 Feb 2008 21:15:44 +0000 (21:15 -0000)
committerRobert Jordan <robertj@gmx.net>
Mon, 25 Feb 2008 21:15:44 +0000 (21:15 -0000)
* Win32RegistryApi.cs (ToString): Don't emit the handle value
under NET_2_0.
See http://msdn2.microsoft.com/en-us/netframework/aa497241.aspx.

svn path=/trunk/mcs/; revision=96593

mcs/class/corlib/Microsoft.Win32/ChangeLog
mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs

index 7b55e88c4fc7df29cb7a9316d79879f0f1360f4c..ae26d3fdb7badd32088c6eec004448fb8650e33b 100644 (file)
@@ -1,3 +1,9 @@
+2008-02-25  Robert Jordan  <robertj@gmx.net>
+
+       * Win32RegistryApi.cs (ToString): Don't emit the handle value
+       under NET_2_0.
+       See http://msdn2.microsoft.com/en-us/netframework/aa497241.aspx.
+
 2008-02-01  Gert Driesen  <drieseng@users.sourceforge.net>
 
        * RegistryKey.cs: Added missing checks on length of subkey and value
index 1849a46f4e1e4a2c6d5fc81d6a5e6488e203f346..c32ac30c801a8b9b5cc6827fe884274bc0d85a91 100644 (file)
@@ -536,9 +536,13 @@ namespace Microsoft.Win32
 
                public string ToString (RegistryKey rkey)
                {
+#if NET_2_0
+                       return rkey.Name;
+#else                  
                        IntPtr handle = GetHandle (rkey);
                        
                        return String.Format ("{0} [0x{1:X}]", rkey.Name, handle.ToInt32 ());
+#endif
                }
 
                /// <summary>