为什么“ELSE:”在vb.net中编译?

前端之家收集整理的这篇文章主要介绍了为什么“ELSE:”在vb.net中编译?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_301_0@ 为什么编译?
If Months > 1 Then

    Label.Text = Months + " Months"

Else : Months = 1

    Label.Text = Months + " Month"

End If

使用Visual Studio 2010.

:是一个行分隔符.它等同于换行符:
If Months > 1 Then

    Label.Text = Months + " Months"

Else

    Months = 1
    Label.Text = Months + " Month"

End If

And here’s the best documentation I could find.对不起

原文链接:https://www.f2er.com/vb/255308.html

猜你在找的VB相关文章