-
-
Notifications
You must be signed in to change notification settings - Fork 239
Closed
Labels
Description
With version 1.6.9 on .NET 9, sometimes hexadecimal and binary literals are interpreted as decimal, e.g. both 0x10 and 0b10 become ten.
Example:
using System.Linq.Dynamic.Core;
using System;
public class Program
{
public static void Main()
{
Console.WriteLine(DynamicExpressionParser.ParseLambda(ParsingConfig.Default, [], typeof(long), "0x10").Compile().DynamicInvoke());
Console.WriteLine(DynamicExpressionParser.ParseLambda(ParsingConfig.Default, [], typeof(long), "0xa").Compile().DynamicInvoke());
Console.WriteLine(DynamicExpressionParser.ParseLambda(ParsingConfig.Default, [], typeof(long), "0b10").Compile().DynamicInvoke());
}
}Output:
10
10
10
Fiddle: https://dotnetfiddle.net/0uBzM9