如果没有beforefieldinit,运行库就必须在某个精确时间运行类型构造函数,即,恰好在第一次访问该类型的静态或实例字段和方法之前。
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.
这种做法并不常见,因为需要开发人员创建仅用于访问非实例(静态)方法和字段的对象的实例。
This is unusual because it requires a developer to create an instance of an object just to access non-instance (static) methods and fields!
这种做法并不常见,因为需要开发人员创建仅用于访问非实例(静态)方法和字段的对象的实例。
This is unusual because it requires a developer to create an instance of an object just to access non-instance (static) methods and fields!
应用推荐