18
The IPAddress class (System.Net) has an overridden Equals method that will compare the addresses, not the object instances, which is what you want. String comparison here may be dangerous since it is possible for IP addresses to have more than one string representation.
http://msdn.microsoft.com/en-us/library/system.net.ipaddress.equals%28v=VS.71%29.aspx
IPAddress.Parse(ip1).Equals(IPAddress.Parse(ip2))