close
標題:
VB2005 Text.index 問題
發問:
textbox1.text="234,2552,567" For I As Integer = 0 To TextBox1.Text.Length - 1 If TextBox1.Text.IndexOf(",") = I Then TextBox2.Text += i End If Next 呢個方法只能搵到第一個"," 即係index只能找到=3 有咩方法可以搵晒咁多個index
此文章來自奇摩知識+如有不便請留言告知
最佳解答:
裡建議改用instr dim intStart as integer textbox1.text="234,2552,567" For I As Integer = 0 To TextBox1.Text.Length - 1 If instr(intStart, textbox1.text,",") > intStart Then intStart=instr(intStart, textbox1.text,",") TextBox2.Text += i End If Next
其他解答:1C924F1C0172E337
文章標籤
全站熱搜