IPAddress.Equals Method (Object)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Compares two IP addresses.

Namespace:   System.Net
Assembly:  System (in System.dll)

public override bool Equals(
	object comparand


Type: System.Object

An IPAddress instance to compare to the current instance.

Return Value

Type: System.Boolean

true if the two addresses are equal; otherwise, false.

The Equals method compares the current IPAddress instance with the comparand parameter and returns true if the two instances contain the same IP address.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top