I need to define the IP address in the class System.Net.IPAddress but the method:
IPAddress ipaddress = IPAddress.Parse("127.0.0.1"); //127.0.0.1 as an example
doesn’t work, is there another method?
How can I define the IP address?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ve probably miss-typed something above that bit of code or created your own class called IPAddress. If you’re using the .net one, that function should be available.
Have you tried using System.Net.IPAddress just in case?
The docs on Microsoft’s site have a complete example which works fine on my machine.