7
爲什麼編譯?爲什麼「ELSE:」在vb.net中編譯?
If Months > 1 Then
Label.Text = Months + " Months"
Else : Months = 1
Label.Text = Months + " Month"
End If
使用Visual Studio 2010
爲什麼編譯?爲什麼「ELSE:」在vb.net中編譯?
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