C#VS2010没有进入For循环?

Rei*_*eid 1 c# for-loop visual-studio-2010

以下代码未进入i for循环.我的电脑和VS2010出了问题.这是编码问题(我是编程c#.net的vb.net程序员)还是vb安装问题?

            for(int hi = 1; hi > 10; hi++)
            {
                reply = pingsender.Send(ip, 500, buffer, options);
                avgtime += reply.RoundtripTime;
            }
            //EDIT:
            //All code except for issue taken offline due to company policy
            //sorry for any inconvience
Run Code Online (Sandbox Code Playgroud)

这段代码嵌套在四个for循环中(一切都工作)并且是runnin,并且用于将ping统计信息放在列表框中.对不起凌乱的代码,我在代码工作后发表评论和清理.

提前感谢您的辛勤工作!

Mar*_*ell 11

for(int hi = 1; hi > 10; hi++)
Run Code Online (Sandbox Code Playgroud)

永远不会是真的; 在第一次测试时失败,但事实1并非如此> 10.

中间条款(基本上)是"而" - 而不是"直到".我怀疑你需要< 10(9次迭代)或<= 10(10次迭代).