That happens because the compiler is confused about the actual value of this string. To "fix" this, you need to force its interpretation. Try the code below:
return ip.ToString();