Exemplo n.º 1
0
 /// <summary>
 /// 取得IP的各个部分
 /// </summary>
 /// <param name="address"></param>
 /// <returns></returns>
 public static int[] GetIntPart(this IPAddress address)
 {
     var stringlist = address.GetStringParts();
     int[] res = new int[stringlist.Length];
     for (int i = 0; i < stringlist.Length; i++)
     {
         res[i] = stringlist[i].ToInt();
     }
     return res;
 }