Debugger stepping into if() block where condition is false

后端 未结 2 1022
天命终不由人
天命终不由人 2020-12-09 08:04

Given this gem of code:

class Program
{
    private static bool IsAdmin = true;

    static void  Main(string[] args)
    {
        if (!IsAdmin)
        {
          


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 08:17

    Check out this link. It's a known bug in some versions of visual studio and the .NET framework version. It's completely harmless and something you will just have to live with.

提交回复
热议问题