In.net, a default constructor is also needed for a serialization class.
在. NET中,序列化类也需要缺省构造函数。
The first is a default constructor that sets a timestamp member variable.
第一部分是一个默认的构造函数,用来设置timestamp变量的值。
This code first creates a new InitialContext using the default constructor.
上面的代码首先使用缺省的构造器创建一个新InitialContext。
This essentially means that the WCF attribute will utilize the default constructor.
这基本上意味着WCF 将会使用默认的构造器。
The class being serialized/deserialized is not required to have a default constructor.
序列化/逆序列化的类不需要有默认构造函数。
What is a default constructor?
什么是默认构造函数?
DefaultConstructible objects only need to have a default constructor.
可缺省构造的对象只需具有一个缺省构造函数。
The default constructor invoked the no - arg constructor of the superclass.
默认构造函数调用父类的无参数构造函数。
An implicitly-declared default constructor is an inline public member of its class.
一个隐式声明的构造函数是这个类的一个内联公有成员。
For class types, objects are initialized by running the class's default constructor.
对类类型来说,通过运行类的默认构造函数来初始化对象。
Or, as the following example shows, you can pass the data using a non-default constructor.
另外,您还可以使用非默认的构造函数来传递该数据,如下面的示例所示。
A struct may not declare a default constructor (a constructor without parameters) or a destructor.
结构不能声明默认构造函数(没有参数的构造函数)或析构函数。
Each value type has an implicit default constructor that initializes the default value of that type.
每种值类型均有一个隐式的默认构造函数来初始化该类型的默认值。
The synthesized default constructor often suffices for classes that contain only members of class type.
合成的默认构造函数一般适用于仅包含类类型成员的类。
Note that you can drop the parentheses when using a default constructor (i.e., one that takes no arguments).
注意,你在使用默认构造函数时可以不用写括号(例如,没有参数的构造函数)。
A default constructor for a class X is a constructor of class X that can be called without an argument.
类x的默认构造函数是指可以被无参数调用的X的构造函数。
Assuming that the allocation succeeds, then the object is initialized by running the default constructor.
假定分配成功,则通过运行默认构造函数初始化该对象。
This constraint forces any type 't' to have a default constructor, that is, a constructor that takes no parameters.
这个约束强制任何类型'T '都必须具有无参数的公共构造函数。
If we do not explicitly define any constructors, then the compiler will generate the default constructor for us.
如果没有为一个类显式定义任何构造函数,编译器将自动为这个类生成默认构造函数。
According to the CDI specification, having a no-arg default constructor makes this class eligible to be a managed bean.
根据CDI规范,有一个no - arg默认构造函数使得这个类能成为托管bean。
Using the new operator calls the default constructor of the specific type and assigns the default value to the variable.
此调用后,该结构被认为已被明确赋值;也就是说该结构的所有成员均已初始化为各自的默认值。
If there is no default constructor, then there is a compile-time error: the object must be given an explicit initializer.
如果没有默认构造函数,那么将会出现编译时错误:必须要给对象指定显式的初始化式。
Creates an instance of the COM object whose name is specified, using the named assembly file and the default constructor.
使用命名的程序集文件和默认构造函数,创建指定名称的COM对象的实例。
Class members that are not initialized in the initializer list are implicitly initialized by using their default constructor.
没有在初始化列表中初始化的类成员,使用它们的默认构造函数隐式初始化。
Class members that are not initialized in the initializer list are implicitly initialized by using their default constructor.
没有在初始化列表中初始化的类成员,使用它们的默认构造函数隐式初始化。
应用推荐