Merge branch 'master' into msbuilddll2
[mono.git] / mcs / class / corlib / System / NumberFormatter.cs
index 4f948aaf38bdb485bf3d395827b4862a255256a5..dc0fb5a1e11800578f51294235ee4d2d5884cb05 100644 (file)
@@ -557,9 +557,7 @@ namespace System
 
                private void Resize (int len)
                {
-                       char[] newBuf = new char [len];
-                       Array.Copy (_cbuf, newBuf, _ind);
-                       _cbuf = newBuf;
+                       Array.Resize (ref _cbuf, len);
                }
 
                private void Append (char c)
@@ -783,6 +781,7 @@ namespace System
                        threadNumberFormatter = null;
                        if (res == null)
                                return new NumberFormatter (Thread.CurrentThread);
+                       res.CurrentCulture = Thread.CurrentThread.CurrentCulture;
                        return res;
                }
 
@@ -791,12 +790,6 @@ namespace System
                        threadNumberFormatter = this;
                }
 
-               internal static void SetThreadCurrentCulture (CultureInfo culture)
-               {
-                       if (threadNumberFormatter != null)
-                               threadNumberFormatter.CurrentCulture = culture;
-               }
-
                public static string NumberToString (string format, sbyte value, IFormatProvider fp)
                {
                        NumberFormatter inst = GetInstance();