Hey everyone I have made an arraylist that takes a stream of information from a string I have made that contains some IP addresses. However I am having a problem assigning the information correctly to my ArrayList. Each IP address is approxiamtely 13 characters long. Here is my code..
string IPAdressesofSystems = service.GetNearbySystems(host);
ArrayList newList = new ArrayList();
for (int i = 0; i < IPAdressesofSystems.Length; i++)
{
newList.Add(IPAdressesofSystems.Substring(i, 13));
}
I am well aware it's because of the
"i" index I am using in my Substring method is starting at the next incremented index. For example it starts out doing "index[0] = 150.542.234.23 index[1] = 45.543.245.21 index[2] = 4.342.233.29..etc.." because the i is incrementing by one which is making the starting index go up by one everytime. How would I make it so it records all 13 characters of Each IP adress?