public int AddrToNumber( string AAddr)
{
if (AAddr == string . Empty || AAddr == null ) return 0 ;
string [] vAddrs = AAddr . Split( new string [] { "." },
StringSplitOptions . RemoveEmptyEntries);
if (vAddrs . Length != 4 ) return - 1 ;
int Result = 0 ;
byte b;
if ( byte . TryParse(vAddrs[ 0 ], out b))
Result |= b << 24 ;
if ( byte . TryParse(vAddrs[ 1 ], out b))
Result |= b << 16 ;
if ( byte . TryParse(vAddrs[ 2 ], out b))
Result |= b << 8 ;
if ( byte . TryParse(vAddrs[ 3 ], out b))
Result |= b;
return Result;
}