-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Description
Description
The following expression results in the wrong parsed value:
string s = BigInteger.Parse("FFFFFFFFFFFFFFFF01", NumberStyles.HexNumber, null).ToString("X")
Debug.Assert(s == "F01");I would expect the string to be the same as the input -- FFFFFFFFFFFFFFFF01. Further, any number of Fs results in the same F01 result.
Trying another huge number results in the correct parsing:
string s = BigInteger.Parse("abcdefabcdefabcdefabcdefabcdef", NumberStyles.HexNumber, null).ToString("X")
Debug.Assert(s == "ABCDEFABCDEFABCDEFABCDEFABCDEF");Configuration
.NET SDK (reflecting any global.json):
Version: 5.0.201
Commit: a09bd5c86c
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.201\
Host (useful for support):
Version: 5.0.4
Commit: f27d337295