c# - System.Net.IPAddress.Address' is obsolete -
i try convert ip address uint
:
ipaddress requstedipaddress; uint requesteipaddressuint = (uint)ipaddress.parse(requstedipaddress.tostring()).address;
and got warning:
'system.net.ipaddress.address' obsolete: 'this property has been deprecated. address family dependent. please use ipaddress.equals method perform comparisons.
what mean , should use other way ?
the deprecation warning tells in next update of library has ipaddress
defined, no longer have ipaddress.address
property. code fail compile after next update library.
if go documentation ipaddress.address notes property obsolete , should instead use ipaddress.getaddressbytes.
the deprecation of ipaddress.address
due adoption of ipv6 128 bits while c# type long
, system.int64, 64 bits.
Comments
Post a Comment