Public Overridable Sub printMatrix()
administrator.ListBox1.Items.Add(ControlChars.Lf)
For i As Integer = 1 To matrix.Length - 1
For j As Integer = 1 To matrix.Length - 1
Dim parser() As String = matrix(i)(j).Split(New Char() {" "c})
' Dim parser() As String = matrix(i)(j).Split(" ", True)
For k As Integer = 0 To parser.Length - 1
If Regex.IsMatch(parser(k), "[a-zA-Z ]*\d+.*") Then
Console.Write(Double.Parse(parser(k)) & " ")
End If
'If parser(k).matches("[a-zA-Z ]*\d+.*") Then
' Console.Write(Double.Parse(parser(k)) & " ")
'End If
Next k
administrator.ListBox1.Items.Add("|" & ControlChars.Tab)
Next j
administrator.ListBox1.Items.Add(ControlChars.Lf)
Next i
End Sub
Getting a NullReferenceException
on Split String error when running program.
Sorry, new here. I'm parsing through an array and trying to print the values to a listbox
. The original code was written in Java and after using a converter to add it to my vb.net code I'm getting this null exception.