views:

42

answers:

1

Is there one method or property in the .NET Framework that tells if an IP address is private? Or must a custom check be coded?

A: 

Only for IPv6 addresses with the IPAddress.IsIPv6SiteLocal property. You'll have to cook your own for IP4.

Hans Passant
Does this IP6 method mean the same as private IP address? MSDN docs don't specify http://msdn.microsoft.com/en-us/library/system.net.ipaddress.isipv6sitelocal(VS.80).aspx
John K
link: http://en.wikipedia.org/wiki/Site-local_address
Hans Passant
Thanks that link clears it up.
John K