Vb.net 如何创建一个将字符串拆分为不同电子邮件的循环?

Vb.net 如何创建一个将字符串拆分为不同电子邮件的循环?,vb.net,Vb.net,这是不言自明的。我想把Cc分成电子邮件使用;作为一个指标,我目前掌握的代码如下: Dim sEmailAddress As String Dim iPos As Integer iPos = InStr(Me.Cc, ";") ' Looks in the first parameter for the second parameter and returns the position of the first occuran

这是不言自明的。我想把Cc分成电子邮件使用;作为一个指标,我目前掌握的代码如下:

Dim sEmailAddress As String



                Dim iPos As Integer
                iPos = InStr(Me.Cc, ";") ' Looks in the first parameter for the second parameter and returns the position of the first occurance of the second parameter. If there is no occurrance of the second parameter then 0 will be returned
                ' 
                Dim iLen As Integer
                iLen = Len(Me.Cc) ' iLen will = then length of me.CC - for example if me.cc = "Hello World", iLen = 11

                '
                Dim sPart As String
                sPart = Left(Me.Cc, 10) ' Returns the first 10 characters from Me.CC - for example if Me.CC = "Hello World", sPart = "Hello Wor"
                '
                Dim sPart2 As String
                sPart2 = Right(Me.Cc, 4) ' Returns the right most 4 characters from Me.CC, for example if me.CC = "Hello World", sPart2 = "orld"
                '
                Dim sPart3 As String
                sPart3 = Mid(Me.Cc, 6, 2) ' Returns 2 characters starting at position 6 from Me.CC, for example if me.cc = "Hello World", sPart3 = " W"

                Do While 


                    ' get email address
                    oNetworxEmail.AddToAddress(sEmailAddress)
                Loop
                If  Then
                    ' get email address
                    oNetworxEmail.AddToAddress(sEmailAddress)
                End If

如果你想那样做的话,那是一件很头疼的事。String.split是一种更好的方法

Dim splitArray() As String = String.Split(Me.Cc, ";")

看看
String.Split()
。我知道String.Split。但在我尝试分裂之前,我需要这样做