vb.net 中 两个string()合并

2024-12-12 22:39:49
推荐回答(1个)
回答1:

Dim Str1() As String = {"123", "321", "231", "132"}
Dim Str2() As String = {"qwe", "asd", "zxc", "sdf", "asdf"}
Dim Str() As String = Str1
ReDim Preserve Str(Str1.Length + Str2.Length - 1)
Str2.CopyTo(Str, Str1.Length)