新手问一个有关程序运行过程的问题!求高手解答!
如图,程序将两个文本框中的字符串连接,在结果文本框中输出,很简单的程序。
第一种方式:先将两个文本框中的字符串赋给两个变量,再连接输出
Private Sub btnConcatenateString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConcatenateString.Click
Dim strOne, strTwo, strResults As String
strOne = txtStrOne.Text
strTwo = txtStrTwo.Text
strResults = strOne & strTwo
txtStrResults.Text = strResults
End Sub
Private Sub btnConcatenateString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConcatenateString.Click
Dim strResults As String
strResults = txtStrOne.Text & txtStrTwo.Text
txtStrResults.Text = strResults