这个建构函式允许初始化事件资料。
静态类别和结构也可以拥有建构函式。
空的建构函式宣告防止自动产生预设建构函式。
The declaration of the empty constructor prevents the automatic generation of a default constructor.
静态建构函式并不使用存取修饰词,也没有参数。
A static constructor does not take access modifiers or have parameters.
使用者无法控制程序中静态建构函式执行的时间。
The user has no control on when the static constructor is executed in the program.
每当建立类别或结构时,就会呼叫它的建构函式。
Whenever a class or struct is created, its constructor is called.
这个呼叫所传回的方法阵列中并不包含建构函式。
Constructors are not included in the array of methods returned by this call.
转换运算子和建构函式已经定义为产生相同的转换。
A conversion operator and a constructor have been defined making the same conversion.
读取伫列时,最常用的是具有目标型别参数的建构函式。
The constructors with target type parameters are most frequently used when reading from the queue.
否则,新项目也可以透过其公用预设建构函式自动建立。
Otherwise, the new item is automatically created through its public default constructor.
平台叫用无法用于依照值传回包含建构函式的结构或类别。
Platform invoke cannot be used to return structures or classes by value if they contain a constructor.
取得或设定值,指出型别参数是否具有建构函式条件约束。
Gets or sets a value indicating whether the type parameter has a constructor constraint.
描述动态类别之建构函式的定义、所用的属性,以及其限制。
Describes the definition of constructors for dynamic classes, the attributes used, and limitations.
搜寻其参数符合在指定阵列中的型别的公用执行个体建构函式。
Searches for a public instance constructor whose parameters match the types in the specified array.
如果您为动态型别定义了建构函式,则不会提供预设建构函式。
If you define a constructor for your dynamic type, a default constructor is not provided.
执行个体建构函式也可以用来呼叫基底类别的执行个体建构函式。
Instance constructors can also be used to call the instance constructors of base classes.
这可用来建立完整的功能表结构,并指派到功能表项目的建构函式。
This enables you to create complete menu structures and assign them to the constructor for the menu item.
在这种情况下,应用程序可以使用其中一个接受识别项值的建构函式。
In this case, the application can use one of the constructors that takes an identifier value.
当阵列在建构函式的成员初始设定清单中时,阵列元素将预设为初始化。
When an array is in a constructor's member initialization list, the elements of the array will be default initialized.
这些引数也称为位置引数,因为它们会当做位置参数提供给属性建构函式。
These are also known as positional arguments because they are supplied to attribute constructors as positional parameters.
此规则会检查每个建构函式参数,以查看您是否已为它们定义对应的属性。
This rule checks that for each constructor parameter, you have defined the corresponding property.
如果其他建构函式在此存取任何成员或呼叫成员函式,结果会是未定义的。
If those other constructors access any members or call member functions on this, the result will be undefined.
因此,如果您的提供者控制项有多个回呼方法,这个建构函式多载会很有用。
Therefore, this overload of the constructor is useful if you have multiple callback methods in your provider control.
如果您的类别包含静态栏位,请提供在类别载入时会将其初始化的静态建构函式。
If your class contains static fields, provide a static constructor that initializes them when the class is loaded.
若要修正此规则的违规情形,请使建构函式受到保护,或者勿将型别宣告为抽象。
To fix a violation of this rule, either make the constructor protected or do not declare the type as abstract.
静态建构函式通常用在当类别使用记录档,而建构函式被用来将项目写入该档案。
A typical use of static constructors is when the class is using a log file and the constructor is used to write entries to this file.
如果阵列的元素型别没有建构函式,则阵列的元素将会以该型别的对应零表示初始化。
If the array's element type does not have a constructor, the elements of the array will be initialized with the corresponding zero representation for that type.
这些资料结构不包含建构函式、复制指派运算子,或本身不是PODS的非静态资料成员。
They do not contain constructors, copy assignment operators, destructors, or non-static data members that are not themselves PODS.
静态成员会在第一次受到存取前,以及静态建构函式(如果有)受到呼叫之前进行初始化。
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 a class does not have a constructor, a default constructor is automatically generated and default values are used to initialize the object fields.
应用推荐