What is wrong here in the code
Dim sReaderList As String
sReaderList = New System.String(vbNullChar, 1024)
Dim x As Integer = Convert.ToInt32(sReaderList)
When debug it produce “Format Exception was Unhandeled”
and Input string was not in a correct format in vb.net
You’re trying to convert a string filled with non digits to integer… so you’re getting the error.
Did you expect something different? Why?
If you want to catch the exception, you could do
Note, just for example, that if you insert a digit at the beginning of the string, the error disappear.