不是常数也不是只读字段的静态字段不是线程安全的。
Static fields that are neither constants nor read-only are not thread-safe.
我们现在使用一个只读字段来标示contract验证器,从而取代了过去使用的自定义属性。
Instead of using custom attributes to use a contract verifier, we now use a read-only field in the test fixture.
最初,表单中的所有字段都是只读的。
如果想让对象的属性和字段都为只读并可在构造函数中进行设置,那么我们仍然需要像在。NET 1.0那样编写代码。
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.
Fixed——ESQL只读路径(字段引用)字段属性。
Fixed — ESQL read-only path (field reference) field property.
因为我们在每一个参数声明前放置了val关键字,它们会被自动地转换为有同样名字的只读的字段,并且伴有同样名字的公开读取方法。
Because we put the val keyword before each parameter declaration, they are automatically converted to read-only fields with the same names with public reader methods of the same name.
另外要使属性只读的话,哈希码函数会只用那些Key字段产生哈希码。
In addition to making the property read-only, the hash code function will only use these 'key' fields to generate the hash code.
给只读变量、字段或方法赋值将产生错误。
Assignments to read-only variables, fields, or methods generate errors.
但软件开发人员常将文本编辑控件用做只读输出字段,编辑控件当然可以作为输出字段。
Yet software developers frequently use the text edit control for read-only output fields.
可以使这些字段成为只读或可修改的字段。
一定不要使用托管库的公共只读数组字段来定义应用程序的边界行为或安全性,因为公共只读数组字段可以被修改。
Never use read-only public array fields from managed libraries to define the boundary behavior or security of your applications because read-only public array fields can be modified.
一定不要使用托管库的公共只读数组字段来定义应用程序的边界行为或安全性,因为公共只读数组字段可以被修改。
Never use read-only public array fields from managed libraries to define the boundary behavior or security of your applications because read-only public array fields can be modified.
应用推荐