I have a range of IP address, 10.0.0.0/8 (which translates 10.0.0.0 to 10.0.0.255).... and I have an IP that I would like to validate is within this range. Like so...
Question is... what does the IsInRange fxn look like and is there such a function already available in .NET? How do I parse out a block of IPs (10.0.0.0 to 10.0.0.255) from a single string that uses the slash (/) notation?Code:string sClientIP = "10.0.0.2"; string sValidIPRange = "10.0.0.0/8"; bool bReturn = IsInRange(sClientIP,sValidIPRange);




Reply With Quote