C#怎样让数组接收textbox的text内容
展开全部
text.tostring().tochararray()
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
Dim arr() As Integer, tmp1, tmp2, tmp3 As String
tmp1 = Split(Text1, vbCrLf)
tmp2 = Split(tmp1(0), "x")
ReDim arr(UBound(tmp1), UBound(tmp2))
For i = 0 To UBound(tmp1)
For j = 0 To UBound(tmp2)
arr(i, j) = Val(Split(tmp1(i), "x")(j))
Next
Next
'arr你要的二维数组
End Sub
Private Sub Form_Load()
Text1.Text = "1 x2x3y" & vbCrLf & "2 x3x4y" & vbCrLf & "3 x4x5y"
End Sub
Dim arr() As Integer, tmp1, tmp2, tmp3 As String
tmp1 = Split(Text1, vbCrLf)
tmp2 = Split(tmp1(0), "x")
ReDim arr(UBound(tmp1), UBound(tmp2))
For i = 0 To UBound(tmp1)
For j = 0 To UBound(tmp2)
arr(i, j) = Val(Split(tmp1(i), "x")(j))
Next
Next
'arr你要的二维数组
End Sub
Private Sub Form_Load()
Text1.Text = "1 x2x3y" & vbCrLf & "2 x3x4y" & vbCrLf & "3 x4x5y"
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询