Ejemplo n.º 1
0
 /// <summary>
 /// Check ip is in min to max;
 /// </summary>
 /// <param name="ip"></param>
 /// <param name="min"></param>
 /// <param name="max"></param>
 /// <returns></returns>
 public static bool In(this IPAddress ip, IPAddress min, IPAddress max)
 {
     var lip = ip.ToInt64();
     var lmin = min.ToInt64();
     var lMax = min.ToInt64();
     return lip <= lMax && lip >= lmin;
 }