2013-03-08 89 views

回答

0

如果客戶名稱(文字<的客戶名稱=>行)你的「正文的」是一個TextBox你可以採取.Lines財產的利潤:

Dim index As Integer 
Dim customerName As String = "" 

For i As Integer = 1 to TextBox1.Lines.Length - 1 
    If TextBox1.Lines(i-1).Contains("Customer") Then 
     customerName = TextBox1.Lines(i) 
     Exit For 
    End If 
Next 

如果你有一個純文本,您可以獲取拆分整個文本行:

Dim lines() As String = sAllText.Split(Environment.NewLine()) 

,然後做和以前一樣,但不是使用TextBox1.Lines,使用lines

相關問題