作为示例,我有简单的控制台应用程序:
namespace Temp
{
class Program
{
const double GlobalEps = 0.01;
static void Main(string[] args)
{
const double LocalEps = 0.01;
var result1 = 0.001 < GlobalEps;
var result2 = 0.001 < LocalEps;
var result3 = 0.011 < LocalEps;
}
}
}
所以,我在调试中看不到“LocalEps”常量的值,在观察视图中。
另外,Visual Studio 没有通过将鼠标悬停在代码中的名称上来显示它。
Visual Studio 2022 具有相同的行为。
这是一个错误还是其他什么?