简体   繁体   English

如何将php代码转换为vb.net进行循环

[英]how to convert php codes to vb.net for loop

how do i convert this php code to vb im trying to do this in .net but the value is only 1 value what is the code of .net using my php codes 我如何将这个php代码转换为vb,我试图在.net中做到这一点,但是该值只有1个值。使用我的php代码的.net代码是什么

this is my code in php 这是我在php中的代码

              $ctr = 7 
              for ($i = 0;$i < $ctr;$i++) 
                { 
                    $prenum .= '0';
                } 

output = 0000000 输出= 0000000

    Dim prenum as string = "0"
    Dim ctr as Integer = 7
    For i = 0 To ctr
        output = prenum
    Next

output = 0 输出= 0

the operator '.' 运营商 '。' in php concatenates strings, the operator for vb to concatenate is '&'... 在php中连接字符串,vb进行连接的运算符为'&'...

Dim prenum as string = "0"
Dim ctr as Integer = 7
For i = 0 To ctr
    output = output & prenum
Next

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM