各位,一下是我写的一段代码,机子报错了。
dim tel() as string
dim SMS as string
tel() = Mid(SMS, 26, 12)我不知道用什么函数将字符串转化为字符数组啊?

解决方案 »

  1.   

    dim   tel(2)   as   string 
    dim   SMS   as   string 
    tel(0)   =   Mid(SMS,   26,   12) 
    tel(1)   =   Mid(SMS,   26,   10)
    tel(2)   =   Mid(SMS,   26,   8)  
      

  2.   

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
                    Dim strdefiner As String = "hallo"
            Dim sinstr(5) As Char
            Dim i As Integer
            Dim j As Integer
            i = strdefiner.Length        For j = 0 To i Step 1
                sinstr(j) = CChar(Mid(strdefiner, j + 1))
            Next
     End Subhave a try using this code.
      

  3.   

    在VB中貌似没有字符数组这个概念,要不是字节数组,要不就是字符串(string)数组,一个字符也是string
    如果你的SMS中只有英文或数字(ANSI中的单字节字符),可以用字节数组;如果还有汉字,最好用字符串(string)数组
      

  4.   

    http://topic.csdn.net/u/20080803/16/8d13eb14-8af1-4e50-9c20-183f219a4890.html楼主应该是想解决上面那个贴子里面的问题吧,
      

  5.   

    你不如举个例子 你要得到什么吧
    假设 SMS="1234567890ABCDEFGHIJKLMOPQRSTUVW1234567890"
    结果=?