Why is an integer being promoted via an explicit constructor?
为什么是一个整数,正在推动通过一个显式构造函数?
An explicit constructor cannot take part in implicit conversions.
显式构造函数不能参与隐式转换。
The main thing to notice is that you have added an explicit constructor.
主要的注意点是添加了一个显式构造函数。
LaunchApp creates an instance of an Assembly object using the Assembly.LoadFrom static method rather than by using an explicit constructor call.
LaunchApp使用Assembly .LoadFrom静态方法创建Assembly对象的实例,而不是通过显式调用构造函数来创建。
An explicit constructor cannot take part in implicit conversions. It can only be used to explicitly construct an object. For example, with the class declared above.
外部的构造器不能参与部分的隐式转换,只能明确的构造一个对象,例如,用上面的例子。
This program also demonstrates how static field initializers execute before the code inside an explicit type constructor.
此程序还演示了静态字段初始值设定项如何在显式类型构造函数中的代码之前执行。
If the constructor includes no such explicit call, a call to super is implicitly added.
如果构造函数没有包含这样的显式调用,将隐式添加对super的调用。
Processes any explicit or implicit constructor invocation (a call to this or super in the constructor).
处理任何显式或隐式构造函数调用(在构造函数中调用this或super )。
The rule description tells you that an explicit static constructor results in code that performs worse.
该规则说明告诉您,显式静态构造函数会导致代码性能变差。
You'll need to evaluate the tradeoffs in using an explicit type constructor.
您在使用显式类型构造函数时需要进行权衡。
When an explicit type constructor is present, the compilers will not mark the type with beforefieldinit, and the precise timing restrictions lead to the performance drop hinted at by FxCop.
当存在显式类型构造函数时,编译器不会用beforefieldinit标记该类型,精确的计时限制会导致FxCop所暗示的性能下降。
If there is no default constructor, then there is a compile-time error: the object must be given an explicit initializer.
如果没有默认构造函数,那么将会出现编译时错误:必须要给对象指定显式的初始化式。
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.
如果软件设计要求显式调用静态构造函数,则可能该设计存在严重缺陷,请检查该设计。
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.
如果软件设计要求显式调用静态构造函数,则可能该设计存在严重缺陷,请检查该设计。
应用推荐