Good habit: Use public accessors.
好习惯:使用公共访问方法。
使用事件访问器来公开。
为什么使用读写方法?
Set the accessors property of the stereotype to
将原型的accessors属性设置为
This is the most common use of multiple accessors;
这是多个访问器的最常见用法;
In the Choose new accessors dialog, also click Next.
在Choosenew accessors对话框中,也单击Next。
He is right, so don't make all your accessors public!
他说得对,因此不要公开所有读写方法!
Accessors themselves are very simple. They can only do four things.
访问器本身是非常简单的。
Set the property accessors in the stereotype to read-only (see Figure 4).
将原型的accessors属性设置为read - only(参见图4)。
You do not typically need to provide your own custom event accessors.
通常不需要提供自己的自定义事件访问器。
Of course, a Book class should really have accessors like set and get.
当然,Book类应该有像set和get 这样的访问程序。
Next we switch back to the physical level and take a closer look at accessors.
下面我们回到物理层来仔细看看访问器。
Do not provide public event member variables. Use event accessors instead.
不要公开事件成员变量。使用事件访问器来公开。
You declare a custom event and its accessors using the new custom keyword.
你可以利用这个新的Custom关键字来定义一个自定义事件以及它的访问修饰符。
Otherwise, you can call various accessors of Benchmark to generate a custom report.
除此之外,还可以调用Benchmark的各种访问函数来生成定制的报告。
Otherwise, you can call various accessors of Benchmark to generate a custom report.
除此之外,还可以调用Benchmark的各种访问函数来生成定制的报告。
应用推荐