find and solve || findandsolve.com
Please wait.....

C# String GetHashCode()

The C# GetHashCode() method is used to get hash code of this string. It returns an integer value.

Method

public override int GetHashCode()  

Parameters

It does not take any parameter (argument).

Return

It returns hash code of a string object.

C# String GetHashCode() Method Example

    using System; 
    public class StringGetHashCodeExample
    {
        public static void Main(string[] args)
        {
          string str= "Hello Word#";
          Console.WriteLine(str.GetHashCode());
        }
    }    
Output
48327997