[ Web Proxy ]
URL:
Viewing: https://docs.unity3d.com/ScriptReference/Object.GetHashCode.html [Back]  [Original]

Unity - Scripting API: Object.GetHashCode
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    Object.GetHashCode

    Suggest a change

    Success!

    Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

    Close

    Submission failed

    For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

    Close
    Your name Your email Suggestion* Submit suggestion

    Cancel

    Switch to Manual

    Declaration

    public int GetHashCode();

    Returns

    int The hash code for the object.

    Description

    Returns the hash code for the object.

    The hash code is stable for the object and doesn't change if you modify the object's fields, so you can safely use an object as a key in a hash-based collection such as a Dictionary or HashSet. The hash code is consistent with Object.Equals: two references that are equal return the same hash code.


    Web Proxy Viewer  |  New URL  |  Original Page