I am reading IPaddress from xml file and I put it into IPaddress.parse() and then use it but it does not work. it says "An invalid IP address was specified." but when I write it manually it works.
why I cant use IP address after reading xml file. I tried to erase "white spaces" , it said samething again.
string ipadd; //take ip address from xml and use
...
IPAddress ipaddre = IPAddress.Parse(ipadd);
------------------------------
IPAddress ipaddre = IPAddress.Parse("255.255.255.255")
why these are not giving same result?
ipaddin debugI think it has \n and \r characters+1 for that! I got this "An invalid IP address was specified." error when the IP address had a dodgy hidden trailing character, probably due to copy and pasting from somewhere else. Fixed by deleting and manually typing the IP address in again.