The runtime does not give a type constructor a second chance.
运行库不会给类型构造函数第二次机会。
The constructor can take a simple built-in numerical type or character data.
该构造函数可以接受简单的内置数值类型或字符数据作为参数。
Constructor parameters must appear after the type name in the class definition.
构造函数参数必须出现在类定义中的类型名称之后。
It also answers your first point, that the constructor must have a return type.
这也回答了你的第一点,这个构造函数必须有返回类型。
One is the primary constructor, whose parameters appear in parentheses just after the type name.
一种是主构造函数,其参数出现在紧靠类型名称后面的括号中。
To fix the second kind, add a private static constructor to your type.
要修复第二类冲突,请向您的类型中添加私有静态构造函数。
The presence of the constructor suggests that the type is not a static type.
出现建构函式意味著此型别不是静态型别。
The presence of the constructor suggests that the type is not a static type.
出现建构函式意味著此型别不是静态型别。
应用推荐