A static constructor cannot be called directly.
无法直接调用静态构造函数。
The user has no control over when the static constructor is called.
用户不能控制何时调用该静态构造函数。
To fix the second kind, add a private static constructor to your type.
要修复第二类冲突,请向您的类型中添加私有静态构造函数。
A static constructor does not take access modifiers or have parameters.
静态建构函式并不使用存取修饰词,也没有参数。
Always provide a static constructor when providing static member variables.
当提供静态成员变量时,总是提供一个静态构造函数。
The user has no control on when the static constructor is executed in the program.
使用者无法控制程序中静态建构函式执行的时间。
A static constructor, also known as a class constructor, is used to initialize a type.
静态构造函数(也称为类构造函数)用于初始化类型。
If a static constructor is not private, it can be called by code other than the system.
如果静态构造函数不是私有,则系统以外的代码可以调用它。
In this article, you've seen some performance consequences when a class has a static constructor.
在本文中,您已经看到了在类具有一个静态构造函数时所导致的性能结果。
A managed class cannot have a static constructor that also has a member initialization list.
托管类中不能有本身有成员初始化列表的静态构造函数。
The rule description tells you that an explicit static constructor results in code that performs worse.
该规则说明告诉您,显式静态构造函数会导致代码性能变差。
A static constructor is modeled by setting the static property of the corresponding UML operation.
通过给相应的UML操作设置static属性来对static constructor建模。
When you have more complicated logic to initialize static member variables, create a static constructor.
当你有更复杂的逻辑来初始化静态成员变量时,请创建静态构造函数。
The programming language compiler added a default static constructor to your type and did not make it private.
编程语言编译器已向您的类型中添加默认静态构造函数,但未将其设置为私有。
As with instance initialization, you can use the initializer syntax as an alternative to the static constructor.
和实例初始化一样,可以使用初始化器语法作为静态构造函数的变体。
If your class contains static fields, provide a static constructor that initializes them when the class is loaded.
如果您的类别包含静态栏位,请提供在类别载入时会将其初始化的静态建构函式。
The system calls the static constructor before the first instance of the type is created or any static members are referenced.
系统在创建第一个类型实例或引用任何静态成员之前调用静态构造函数。
A static constructor is used to initialize any static data, or to perform a particular action that needs to be performed once only.
初始化任何静态数据,或执行特定的操作需要执行一次只使用静态构造函数。
If you want your derived class to set this property, you should do so within the static constructor or in other initialization routines.
如果您希望派生类设置此属性,则应该在静态构造函数或其他初始化例程中完成此工作。
A static constructor is a special function that executes before any other methods, variables, or properties defined in that class are accessed.
静态构造函数是一个特殊的方法,它在类中任何其它方法、变量或者属性被访问之前被执行。
A static constructor is called automatically to initialize the class before the first instance is created or any static members are referenced.
在建立第一个执行个体或参考任何静态成员之前,就会自动呼叫静态建构函式以初始化类别。
The Synthesizer is multi-threaded, therefore they must only be one instance in the program, so make a static one somewhere with a static constructor.
频率合成器是多线程的,因此他们必须在程序的一个实例,使静态和静态构造函数的地方。
Static members are initialized before the static member is accessed for the first time and before the static constructor, if there is one, is called.
静态成员会在第一次受到存取前,以及静态建构函式(如果有)受到呼叫之前进行初始化。
If your software design requires an explicit call to a static constructor, it is likely that the design contains serious flaws and should be reviewed.
如果软件设计要求显式调用静态构造函数,则可能该设计存在严重缺陷,请检查该设计。
First, the program did not hit the catch clause for an exception of type ApplicationException, even though that's the type of exception thrown from the static constructor.
第一,该程序不会为类型是ApplicationException的异常寻找catch子句,即使这种类型的异常是从静态构造函数引发的也如此。
However, it is guaranteed to be loaded and to have its fields initialized and its static constructor called before the class is referenced for the first time in your program.
然而,类别却能保证一定会载入,并会在您的程序第一次参考此类别前,先让其中的栏位初始化,而其中的静态建构函式也受到呼叫。
A link demand performed on a static class constructor does not protect the constructor because static constructors are called by the system, outside the application's code execution path.
对静态类构造函数执行的链接要求不会保护该构造函数,因为静态构造函数是由系统调用的,它们并不包括在应用程序的代码执行路径中。
The second scenario is when a type has a initializer for a static field, in which case the compiler adds a type constructor behind the scenes.
第二种情况是,类型具有一个用于静态字段的初始值设定项,在这种情况下,编译器会在后台添加类型构造函数。
The other way to say it is, never define a global (static global) instance of a class whose constructor or destructor may throw exceptions.
换一种说法就是永远都不要为那些其构造函数和析构函数可能抛出异常的类定义全局(静态全局)实例。
This program also demonstrates how static field initializers execute before the code inside an explicit type constructor.
此程序还演示了静态字段初始值设定项如何在显式类型构造函数中的代码之前执行。
应用推荐