Bladeren bron

2004-02-08 David Sheldon <[email protected]>

  * NumberFormatInfo.cs: When parsing the percentages, put the data
   into PercentDecimalDigits/PercentGroupLengths, rather than trashing
   the NumberDecimatDigits etc. This also means that the percent format
   info gets set.

svn path=/trunk/mcs/; revision=22882
David Sheldon 22 jaren geleden
bovenliggende
commit
20dd2fe10d

+ 7 - 0
mcs/class/corlib/System.Globalization/ChangeLog

@@ -1,3 +1,10 @@
+2004-02-08 David Sheldon <[email protected]>
+
+  * NumberFormatInfo.cs: When parsing the percentages, put the data 
+   into PercentDecimalDigits/PercentGroupLengths, rather than trashing
+   the NumberDecimatDigits etc. This also means that the percent format
+   info gets set.
+
 2004-01-27  David Sheldon <[email protected]>
 
   * NumberFormatInfo.cs: InitPatterns: it seems that the patterns in 

+ 3 - 3
mcs/class/corlib/System.Globalization/NumberFormatInfo.cs

@@ -267,9 +267,9 @@ namespace System.Globalization {
 			if (partOne.Length == 2) {
 				// assumed same for both positive and negative
 				// decimal digit side
-				numberDecimalDigits = 0;
+				percentDecimalDigits = 0;
 				for (int i = 0; i < partOne [1].Length; i ++) {
-					if (partOne [1][i] == zeroPattern [0])
+					if (partOne [1][i] == digitPattern [0])
 						percentDecimalDigits ++;
 					else
 						break;
@@ -278,7 +278,7 @@ namespace System.Globalization {
 				// percent grouping side
 				partTwo = partOne [0].Split (',');
 				if (partTwo.Length > 1) {
-					numberGroupSizes = new int [partTwo.Length - 1];
+					percentGroupSizes = new int [partTwo.Length - 1];
 					for (int i = 0; i < percentGroupSizes.Length; i ++) {
 						string pat = partTwo [i + 1];
 						percentGroupSizes [i] = pat.Length;