Udostępnij za pośrednictwem


ICollection.GetHashCode Method

Definition

Returns the hash code value for this collection.

[Android.Runtime.Register("hashCode", "()I", "GetGetHashCodeHandler:Java.Util.ICollectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GetHashCode ();
[<Android.Runtime.Register("hashCode", "()I", "GetGetHashCodeHandler:Java.Util.ICollectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetHashCode : unit -> int

Returns

the hash code value for this collection

Attributes

Remarks

Returns the hash code value for this collection. While the Collection interface adds no stipulations to the general contract for the Object.hashCode method, programmers should take note that any class that overrides the Object.equals method must also override the Object.hashCode method in order to satisfy the general contract for the Object.hashCode method. In particular, c1.equals(c2) implies that c1.hashCode()==c2.hashCode().

Java documentation for java.util.Collection.hashCode().

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.

Applies to