Small typo in the documentation

by Michael S. Kaplan, published on 2005/10/19 12:31 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/10/19/482608.aspx


If you look at the NumberFormatInfo.PercentNegativePattern property in the pre-2.0 version of the .NET Framework, it has a limited number of items:

Value Associated Pattern
0 -n %
1 -n%
2 -%n

If you look at the 2.0 property, it has been expanded a bit!

Value

Associated Pattern

0

-n %

1

-n%

2

-%n

3

%-n

4

%n-

5

n-%

6

n%-

7

-%n

8

n %-

9

% n-

10

% -n

11

n- %

Awesome!

Of course we are lucky to have SDETs like John Caffrey and SDEs like Sébastien Molines on our team, since they don't let the little details slip by.

(Did I mention that I though GIFT was an awesome team?)

As John noticed, in that table pattern number 2 and pattern number 7 are clearly the same.

And then as Sébastien noticed, this does not match what is in the code. This is actually just a typo in the documentation -- the actual table ought to be:

 

Value

Associated Pattern

0

-n %

1

-n%

2

-%n

3

%-n

4

%n-

5

n-%

6

n%-

7

-% n

8

n %-

9

% n-

10

% -n

11

n- %

Ok, so eventually the docs will be fixed and the information will be in a more sustantial place than my little corner.

In the meantime, maybe this note will keep someone from choosing the wrong format. :-)

 

This post brought to you by "%" (U+0025, a.k.a. PERCENT SIGN)


no comments

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

go to newer or older post, or back to index or month or day