InetSocketAddress.Equals(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares this object against the specified object.
[Android.Runtime.Register("equals", "(Ljava/lang/Object;)Z", "")]
public override sealed bool Equals(Java.Lang.Object? obj);
[<Android.Runtime.Register("equals", "(Ljava/lang/Object;)Z", "")>]
override this.Equals : Java.Lang.Object -> bool
Parameters
- obj
- Object
the object to compare against.
Returns
true if the objects are the same;
false otherwise.
- Attributes
Remarks
Compares this object against the specified object. The result is true if and only if the argument is not null and it represents the same address as this object.
Two instances of InetSocketAddress represent the same address if both the InetAddresses (or hostnames if it is unresolved) and port numbers are equal. If both addresses are unresolved, then the hostname and the port number are compared.
Note: Hostnames are case insensitive. e.g. "FooBar" and "foobar" are considered equal.
Java documentation for java.net.InetSocketAddress.equals(java.lang.Object).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.