Answers for "c# ipaddress to integer"

C#
0

c# ipaddress to integer

double IP_address_to_double(string ip)
{
  int i =3;
  double sum=0;
  foreach(string octette in ip.Split("."))
  {
    sum += Math.Pow(256, i) * Convert.ToDouble(octette);
    i--;
  }
  return sum;
}
Posted by: Guest on June-23-2021

C# Answers by Framework

Browse Popular Code Answers by Language