2008-06-07 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mcs / class / corlib / System / Environment.cs
index 05a1c7b6fc1e29865f55a4a3284916b332e319b6..583f19453a7d630e277db044e394752d65e723dd 100644 (file)
@@ -63,7 +63,7 @@ namespace System {
                 * Changes which are already detected at runtime, like the addition
                 * of icalls, do not require an increment.
                 */
-               private const int mono_corlib_version = 65;
+               private const int mono_corlib_version = 67;
                
                public enum SpecialFolder
                {       // TODO: Determine if these windoze style folder identifiers 
@@ -642,7 +642,7 @@ namespace System {
                                if (!IsRunningOnWindows)
                                        return;
                                using (Microsoft.Win32.RegistryKey env = Microsoft.Win32.Registry.LocalMachine.OpenSubKey (@"SYSTEM\CurrentControlSet\Control\Session Manager\Environment", true)) {
-                                       if (value == null || value.Length == 0)
+                                       if (String.IsNullOrEmpty (value))
                                                env.DeleteValue (variable, false);
                                        else
                                                env.SetValue (variable, value);
@@ -652,7 +652,7 @@ namespace System {
                                if (!IsRunningOnWindows)
                                        return;
                                using (Microsoft.Win32.RegistryKey env = Microsoft.Win32.Registry.CurrentUser.OpenSubKey ("Environment", true)) {
-                                       if (value == null || value.Length == 0)
+                                       if (String.IsNullOrEmpty (value))
                                                env.DeleteValue (variable, false);
                                        else
                                                env.SetValue (variable, value);