If you want to maintain a single instance of a variable for all instances of a class, you will use static-class member variables to do it.
如果您想为一个类的所有实例维持一个变量的实例,将会用到静态类成员变量。
Well, I could add a new member field to the class and use that instead of a local variable.
是的,我可以在类中添加一个新的成员字段,并使用这个字段而不是局部变量。
Observe that the implementation emits trace events using the m_logger member variable from the base class.
观察该实现使用基础类中m_logger成员变量发出的跟踪事件。
If the previous function was a class member function, then you would have used an __arg2 variable.
如果前面的函数是类成员函数,那么应该使用__arg2变量。
I've made the number a member variable within the Classifier2 class, which allows me to avoid passing it around as a parameter to a bunch of static methods.
我把数字变成是Classifier 2类中的成员变量,这将允许我避免将其作为参数传递给一大堆静态方法。
When it has the tags as an array, the class loads the _commands member variable with the titles and AppleScript commands.
在获得标记数组时,这个类将标题和AppleScript命令装载到_ commands成员变量中。
The author class should have a lastName and firstName member variable note the naming issues already, but should the member variables in author be last-name or lastName?
author类应该有成员变量lastName和firstName这里会出现前面提到的命名问题,author中的成员变量应该是last - name,还是lastName ?
In this new thread, you then access stocks, a member variable of the enclosing Activity (the class that creates the UI).
在这个新线程中,您可以访问stocks,一个封装activity(此类创建了UI)的成员变量。
Add a new member field to the class and use that instead of a local variable.
在类中添加一个新的成员字段,并使用这个字段而不是局部变量。
You can add a member variable from the Dialog editor in Resource View, or from Class View.
您可以从资源检视内的对话方块编辑器,或者从类别检视加入成员变数。
The system played a monitoring role for the member variable and function of the class in the applying procedure.
该系统提供对应用程序类中成员变量和成员函数的监控功能。
The system plays a monitoring role for the member variable and function of the class in the applying procedure.
该系统提供对应用程序类中成员变量和成员函数的监控功能。
A member variable defined in a class can be accessed only by the classes in the same package.
一个类中定义的成员变量只能被同一包中的类访问。
Any program element - such as a variable, class, or member - can have the same name as a restricted keyword.
任何程序项目,例如变数、类别或成员,可以和限制的关键字具有相同的名称。
Any program element - such as a variable, class, or member - can have the same name as a restricted keyword.
任何程序项目,例如变数、类别或成员,可以和限制的关键字具有相同的名称。
应用推荐