清单1展示了一个示例构造函数。
必须拥有公有的默认构造函数。
您知道Set有一个拷贝构造函数。
此内置open函数的构造函数是。
它的构造函数如清单1所示。
类的构造函数应该是延迟的。
最后还有一个问题,构造函数在哪里?
构造函数带有字符串参数—图标名称。
Note that the constructor takes a string argument, the name of the icon.
公共的默认构造函数;例如。
Pattern没有公共的构造函数。
运行库不会给类型构造函数第二次机会。
The runtime does not give a type constructor a second chance.
类型构造函数也称为类型初始值设定项。
至少提供一个构造函数。
构造函数也可以方便地使用init块。
用工厂方法替换构造函数。
Convert Property to Auto-Property Introduce Field Replace Constructor with Factory method.
主要的注意点是添加了一个显式构造函数。
The main thing to notice is that you have added an explicit constructor.
首先,添加构造函数至product类。
当没有匹配的构造函数时,抛出运行时异常。
Throw an exception at run time when there is no matching constructor.
构造函数的第一个参数是数据源的URI。
The first argument to the constructor is the URI of the data source.
这四个构造函数调用创建了四个不同的整数。
These four constructor calls create four different integers.
请注意,站点的构造函数接受设计器宿主实例。
Note that the site's constructor accepts a designer host instance.
使用ROW和LIST构造函数创建字段列表。
其构造函数将会创建一个对LDAP目录的连接。
Its constructor will create a connection to the LDAP directory.
构造函数被作为引用传递给实际的语法self。
The constructor is passed a reference to the actual grammar self.
这些新对象的构造函数访问PDOM以存储其信息。
The constructors for these new objects access the PDOM to store their information.
提供构造函数。
对象的构造函数和render方法看上去是这样的
The object's constructor and its render method look like this
parent关键字在构造函数方法中尤其重要。
The parent keyword is particularly important in constructor methods.
每个Ruby类有一个名为new的构造函数方法。
如果希望构建列表而不是将其分开,就需要构造函数。
If you want to build lists instead of taking them apart, you need constructors.
应用推荐