问题描述,将正无穷转换位double的代码 double.Parse("∞");在windows ,ubuntu物理机下均正常,但是一到容器中就报Input string was not in a correct format. 已定位到问题就是这一句,原因不明(没找到微软反馈入口)
SDK版本: dotnet-core 3.1
物理机系统: centos 7.6 x86 64位
docker 镜像 mcr.microsoft.com/dotnet/sdk:3.1.417-alpine3.15 (官方镜像)
相关代码
var value = double.Parse("∞");
Console.WriteLine(value );
报错信息
Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Convert.ToDouble(String value)
at metro_core.TrainPlan_Solution..ctor(Line line, DataTable dt_plan, DataTable dt_first_last_times) in C:\Users\yjluo\Desktop\metro-core\metro-core\Objects\TrainPlan_Objects.cs:line 66
at metro_core.Controllers.TimeTableController.TimeTableRunning(TimeTableCreateRequest request) in C:\Users\yjluo\Desktop\metro-core\metro-core\Controllers\TimeTableController.cs:line 43
WARNING: Logging before InitGoogleLogging() is written to STDERR