-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Milestone
Description
Description
From PowerShell/PowerShell#15587.
Possibly related to #50385?
However, in this case this behaviour represents a regression from .NET 6 preview 5.
Repro:
using System;
using System.Diagnostics;
using System.Globalization;
using System.Numerics;
using System.Runtime.InteropServices;
namespace repro
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine($".NET: '{RuntimeInformation.FrameworkDescription}'");
string numStr = args.Length > 0
? args[0]
: "80000000";
BigInteger.TryParse(numStr, NumberStyles.AllowHexSpecifier, NumberFormatInfo.InvariantInfo, out BigInteger bi);
Console.WriteLine($"Expected: '{numStr}'");
Console.WriteLine($"Actual: '{bi.ToString("X")}'");
Debug.Assert(bi.ToString("X") == numStr);
}
}
}Configuration
x64 Windows PC:
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19043 N/A Build 19043
> dotnet version
6.0.100-preview.5.21302.13
Regression?
This previously worked in .NET 6 preview 4.