1 
 
        
      
      为什么C#编译器将此!=比较翻译为>比较?
      
  我偶然发现C#编译器启用了此方法: static bool IsNotNull(object obj) { return obj != null; } …进入此CIL: .method private hidebysig static bool IsNotNull(object obj) cil managed { ldarg.0 // obj ldnull cgt.un ret } …或者,如果您希望查看反编译的C#代码,请执行以下操作: static bool IsNotNull(object obj) { return obj > null; // (note: this is not a valid C# expression) } 怎么把这些!=翻译成“ …
      
        
          
                   147
                
        
        
          
                  
                    c# 
                  
                    cil 
                  
                    il 
                  
                    notnull 
                  
                    binary-operators