Example #1
0
 public static bool?IsInternetIp(string ip, bool nullOnException = false)
 {
     try
     {
         return(IpAddressRange.IsInternetIp(ip));
     }
     catch (Exception x)
     {
         if (nullOnException)
         {
             return(null);
         }
         else
         {
             throw x;
         }
     }
 }
Example #2
0
 public static bool IsInternetIp(IPAddress ip)
 {
     return(IpAddressRange.IsInternetIp(ip));
 }