Inverts IP address value. All 0s are converted to 1s and 1s to 0s

Namespace: SnmpSharpNet
Assembly: SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.9.1.0 (0.9.1)

Syntax

C#
public IpAddress Invert()
Visual Basic
Public Function Invert As IpAddress
Visual C++
public:
IpAddress^ Invert()

Return Value

Inverted value of the IP address

Examples

CopyC#
IpAddress testMask = new IpAddress("255.255.0.0");
IpAddress invMask = testMask.Invert();
Console.WriteLine("original: {0}", testMask.ToString());
// Output: original: 255.255.0.0
Console.WriteLine("inverted: {0}", invMask.ToString());
// Output: inverted: 0.0.255.255

See Also