This is unusual because it requires a developer to create an instance of an object just to access non-instance (static) methods and fields!
这种做法并不常见,因为需要开发人员创建仅用于访问非实例(静态)方法和字段的对象的实例。
Without beforefieldinit, the runtime must run the type constructor at a precise time-just before the first access to static or instance fields and methods of the type.
如果没有beforefieldinit,运行库就必须在某个精确时间运行类型构造函数,即,恰好在第一次访问该类型的静态或实例字段和方法之前。
Referring to enclosing type parameters inside static methods and static inner classes is prohibited outright by the compiler. So, for instance, the following code is illegal in tiger.
编译器完全禁止在静态方法和静态内部类中引用封闭类型参数。
The event handlers you write in the code behind must be instance methods and cannot be static methods.
在代码隐藏中编写的事件处理程序必须是实例方法且不能是静态方法。
You can use string (instance) methods to operate on any property value, and you can call the static methods of many system classes.
可以使用字符串(实例)方法来操作任何属性值,还可以调用许多系统类的静态方法。
The same rules for type inference apply to static methods and instance methods.
相同的型别推断规则也适用于静态方法和执行个体方法。
The same rules for type inference apply to static methods and instance methods.
相同的型别推断规则也适用于静态方法和执行个体方法。
应用推荐