I used this hostInfo.AddressList to get the machine IP address. It returns it in the letter format, such as ff80::c9c9:b2af:aa0f:e2d2%12, what I want is to format it to a IP address format (digits).
I am using C#, .net 3.5.
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.
The format you gave is the correct way to represent an IPv6 address. There does not exist an A.B.C.D format to represent IPv6 addresses.
What’s happening is you are getting a list of addresses both IPv4 and IPv6. You’re looking for the IPv4 ones.