Hello, I Got problem in using delimiter by using vb.net 2008
Please take a look at my code
Dim array As String() Dim IPaddr as String Dim r As New System.IO.StreamReader("config.ini") Dim rline As String = "" Dim s As String = "" While r.Peek <> -1 rline = r.ReadLine() array = rline.Split("=") if array(0) = "IP Address" then IPaddr = array(1) End While MsgBox("This is Host IP : " & HostIp) MsgBox("This is Port : " & Port) r.Close()
The problem is, why I cannot get the array(0) and array(1) values ?
actually before I'm using If, I thought that it can store as many array as the data have but then, it only can store 2 array. So, I decided to use if statement since my config.ini will only have about 5 lines but then I cannot get the array(1) value.
Anyone how what's wrong with my code ?