在每次循环迭代中增加一个计数。
每次对其局部的引用,都将导致计数的适当增加或减少。
Each localized reference to it simply increases or decreases the count as appropriate.
很明显,您不需要在每次单击时都更新选中的消息的计数,而是在该过程完成之后进行更新即可。
Obviously, you don't need to update the count of selected messages with each click, you can do it once at the end of the process.
And obviously, that ought to involve the variable in some way, or it's not going to make a lot of sense, so this includes the variable, since that's the thing that's changing.
很明显,这跟计数器的变量有某种关系,否则的话就没多大意义了,因此这跟计数器有关,因为它正是每次循环改变的东西。
应用推荐