This documentation is archived and is not being maintained.

IPAddress.Equals Method

Compares two IP addresses.

[Visual Basic]
Overrides Public Function Equals( _
   ByVal comparand As Object _
) As Boolean
public override bool Equals(
 object comparand
public: bool Equals(
 Object* comparand
public override function Equals(
   comparand : Object
) : Boolean;


An IPAddress instance to compare to the current instance.

Return Value

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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

IPAddress Class | IPAddress Members | System.Net Namespace