10-25-2013, 11:55 AM
I'm not sure if I'm using the code the right way but I get the same error, again on the same line:
[code2=vbnet]strings.Add(s.Substring(i, 4))[/code2]
The code that I have now is the following:
[code2=vbnet]Dim strings As New List(Of String)
'Just an example of the key, this string will be generated randomly
Dim s As String = "p6s0arJHmuOQmUhIczfnynRS1dOrRxYm0EF05b5Vk1YR7TQVItShNjFJQ1L3d"
Dim i As Integer = 0
Dim remainder As Integer = s.Length Mod 4
For i = 0 To (s.Length - remainder) Step 4
strings.Add(s.Substring(i, 4))
Next
strings.Add(s.Substring(s.Length - remainder, remainder))
For Each srtininglist As String In strings
MessageBox.Show(srtininglist)
Next[/code2]
Am I doing something wrong because I still get the same error?
PS: What's the html code for the 'vbnet code' block? I still use the old one [code][//code].
[code2=vbnet]strings.Add(s.Substring(i, 4))[/code2]
The code that I have now is the following:
[code2=vbnet]Dim strings As New List(Of String)
'Just an example of the key, this string will be generated randomly
Dim s As String = "p6s0arJHmuOQmUhIczfnynRS1dOrRxYm0EF05b5Vk1YR7TQVItShNjFJQ1L3d"
Dim i As Integer = 0
Dim remainder As Integer = s.Length Mod 4
For i = 0 To (s.Length - remainder) Step 4
strings.Add(s.Substring(i, 4))
Next
strings.Add(s.Substring(s.Length - remainder, remainder))
For Each srtininglist As String In strings
MessageBox.Show(srtininglist)
Next[/code2]
Am I doing something wrong because I still get the same error?
PS: What's the html code for the 'vbnet code' block? I still use the old one [code][//code].