对象初始化器,简化了对象的构造和初始化。
Object initializers, which ease construction and initialization of objects.
对象初始化器指定一个或多个对象的域或属性的值。
An object initializer specifies values for one or more fields or properties of an object.
就php来说,这个对象初始化器的参数是path、host和port。
In the case of PHP, the arguments to this object initializer are path, host and port.
对象初始化器中的赋值作为域或属性成员的赋值对待,而不是给域或属性赋予新值。
Instead of assigning a new value to the field or property, the assignments in the object initializer are treated as assignments to members of the field or property.
通过结合对象初始化器和类型接口,我们可以生成一个简单的数据存储对象,而不需要定义相应的类或结构。清单5 - 24演示了一个例子。
By combining object initializers and type inference, we can create simple data-storage objects without needing to define the corresponding class or struct. Listing 5-24 shows an example.
值得注意的一件重要事情是,搜索与其他的对象初始化操作是在事务计时器的外部执行的。
The important thing to note is that the finding and other object initialization is done outside of the transaction timer.
只要在第一次日志记录操作前对日志记录器对象进行了初始化,就可以在许多地方创建它们。
The logger objects could be created in a number of places, as long they are initialized before the first logging operation.
还可以创建一些助手方法以简化服务器对象的样例初始化。
You can also create some helper methods to simplify the boilerplate initialization of the server object.
如果用空的初始化器列表对变量进行初始化,对象为初始化值。
If a variable is initialized with an empty initializer list, the object is value initialized.
事件,例如方法或者构造器调用,类或者对象初始化,以及异常,这些都是有效的aop触发器。
Events, such as methods or constructor calls, classes or object initialization, and exceptions, are all valid AOP triggers.
为了更加智能化,编译器优化会在单例对象所有域完全初始化前就创建该单例对象(参见《重复检查锁的致命点》)。
To wit, compiler optimizations can make the assignment of the new singleton object before all its fields are initialized. (See "Double-checked locking is broken" in Resources.)
一些方法在扮演构造器的角色来分配及初始化一个新的对象。
Any method that allocates and initializes a new object ACTS as a constructor.
如果类有一个构造器,那么这个类的每个对象都应该在程序使用前先初始化构造函数。
If a class has a constructor, each object of that type is initialized with the constructor prior to use in a program.
为目标域初始化对象选取器失败。
对象初始化角指令比控制器的不同吗?
Object initialize different in Angular directive than controller?
当然这可以正常工作,但它并不一定有很好的效率。因为这个对象探测方法会在浏览器中初始化资源。
While that works correctly, it isn't always efficient, as that method of object detection can initialize resources in the browser.
一个构造器是一个函数,你可以调用它实例化和初始化一个特殊的对象类型。
A constructor is a function you call to instantiate and initialize a particular type of object. You invoke a constructor with the new keyword. Here are a few examples of using constructors.
编译器进程的第一个访问默认实例的构造函数,然后通过处理成员初始化对象初始值设定项。
The compiler processes object initializers by first accessing the default instance constructor, and then by processing the member initializations.
根据给定的算法,密钥和初始化向量,创建并返回一个解密器对象。
Creates and returns a decipher object, with the given algorithm, key and iv.
根据给定的算法,密钥和初始化向量,创建并返回一个解密器对象。
Creates and returns a decipher object, with the given algorithm, key and iv.
应用推荐