gpt4 book ai didi

visual-studio - Double 常量是否被截断以在 VS 中显示?

转载 作者:行者123 更新时间:2023-12-04 10:45:02 24 4
gpt4 key购买 nike

常数Math.Pi根据反射器和 MSDN,等于 3.14159265358979323846。在 Visual Studio 2010 中查看 Math 类时,该值显示为 3.14159。我可以怪谁截断了宝贵的常量?

最佳答案

我不知道为什么 OP 没有发布这个,因为它会清除很多东西,但你可以按如下方式重现:

  • 打开IDE
  • 将 Math.PI 输入到 .cs 文件中。
  • 右键单击 Math.PI,然后单击“转到定义”

  • 这将打开 Math 的元数据文件,其中包含以下内容:
        //
    // Summary:
    // Represents the ratio of the circumference of a circle to its diameter, specified
    // by the constant, π.
    public const double PI = 3.14159;

    关于visual-studio - Double 常量是否被截断以在 VS 中显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3742753/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com