class A { A() { var x = 5; // this is allowed } var _x = 5; // the compiler is unhappy }
我想编译器必须能够推导出成员变量的类型,就像它对本地变量一样.那有什么区别?
c#
c# ×1