Can anyone explain this strange behavior with signed floats in C#?

前端 未结 11 2020
别跟我提以往
别跟我提以往 2020-12-07 07:17

Here is the example with comments:

class Program
{
    // first version of structure
    public struct D1
    {
        public double d;
        public int f         


        
11条回答
  •  萌比男神i
    2020-12-07 07:55

    Just an update for this 10 years old bug: it has been fixed (Disclaimer: I'm the author of this PR) in .NET Core which would be probably released in .NET Core 2.1.0.

    The blog post explained the bug and how I fixed it.

提交回复
热议问题