'this code works fine but i have some questions..
Why is it it has to take a loop For i = 0 To ipAddr.Count - 1
and y is it .count - 1? what is - 1?
It's because ipAddr = Dns.GetHostAddresses(hostName) returns an array, so in order to look through the array, we need to loop in some manner. The reason we use .count -1 is that arrays srart at an index of 0, so a 3 element array will have entries in indices 0, 1 and 2, giving a .count of 3.