public double Dot2LongIP(string DottedIP)
{
int i;
string [] arrDec;
double num = 0;
if (DottedIP == "")
{
return 0;
}
else
{
arrDec = DottedIP.Split('.');
for(i = arrDec.Length - 1; i >= 0 ; i --)
{
num += ((int.Parse(arrDec[i])%256) * Math.Pow(256 ,(3 - i )));
}
return num;
}
}
C# Function To Convert IP Address to IP Number
01 January 2001 in Tips-Tricks-Hacks, Tips: Webmaster
0 comments:
Post a Comment Subscribe to Post Comments (Atom)