In this case, you might lack setter methods to modify field properties and, instead, rely on constructors to set these values.
在这种情况下,您可能会缺少用于修改字段属性的setter方法,相反,您依靠构造器来设置这些值。
These bounds could specify the set of available constructors that must be present in any instantiation of the parameter.
这些界限可以指定一组可用的构造函数,它们必须出现在参数的每一个实例化中。
If you want objects where the properties and fields are all read-only and set in constructors, you still have to write the same code you would write in.net 1.0.
如果想让对象的属性和字段都为只读并可在构造函数中进行设置,那么我们仍然需要像在。NET 1.0那样编写代码。
应用推荐