level 12
问题就出在static身上
两段程序:
Static a As Integer
a = 1
a +=1
Static b As Integer = 1
b+=1
这段代码运行两次的话 a是2,b是3
2015年09月03日 07点09分
1
level 10
你这代码相当于
dim a as int32
dim b as int32 = 1
sub todosomething
a=1
a+=1
b+=1
end sub
我个人建议少用static,容易让代码复杂化
2015年09月05日 06点09分
3
嗯 谢吧主的建议
2015年09月05日 07点09分
level 13
其实还有个特性,我之前被坑过。
For i=0 To 9
Dim n%
n+=1
Debug.WriteLine(n)
Next
输出的结果可能不是你想要的
---贴吧极速版 For UWP
2015年09月06日 05点09分
4
回复
�ܿ˶���֮ŭ
:一堆1吗
2015年09月06日 07点09分
回复
�ܿ˶���֮ŭ
:12345678910
2015年09月06日 08点09分