vb.net if inputbox is greater

☆樱花仙子☆ 提交于 2019-12-25 18:53:41

问题


I'm having trouble checking if input is less then or grater 3 characters. should i use if statement or while loop?.

and also how to store all the data in listbox after inputbox entered:

For Num = 1 To CInt(nudPassengers.Value)
    Dim userName As String
    if userName < 3 then
    InputBox("Whats your name? " & Num)
    Dim infoForm As New frmBooking
    infoForm.lstItinerary.Items.Add(userName)
    end if
Next

回答1:


Less than 3 characters

 If Username.Length < 3 Then

 End If
  • String Manipulation
  • Strings


来源:https://stackoverflow.com/questions/13782411/vb-net-if-inputbox-is-greater

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!