Freigeben über


Record.GetHashCode Method

Definition

Returns a hash code value for the record.

[Android.Runtime.Register("hashCode", "()I", "GetGetHashCodeHandler", ApiSince=34)]
public abstract int GetHashCode ();
[<Android.Runtime.Register("hashCode", "()I", "GetGetHashCodeHandler", ApiSince=34)>]
override this.GetHashCode : unit -> int

Returns

a hash code value for this record.

Attributes

Remarks

Returns a hash code value for the record. Obeys the general contract of Object#hashCode Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record#equals Record.equals, so that any two records created from the same components must have the same hash code.

Java documentation for java.lang.Record.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