C# Exception GetHashCode
In this chapter you will learn:
- Get to know Exception.GetHashCode
- Syntax for Exception.GetHashCode
- Returns for Exception.GetHashCode
- Example - Exception.GetHashCode
Description
Exception GetHashCode
serves as the default hash function.
Syntax
Exception.GetHashCode
has the following syntax.
public virtual int GetHashCode()
Returns
Exception.GetHashCode
method returns A hash code for the current object.
Example
using System;//from w w w . j av a2 s.co m
public class MainClass{
public static void Main(String[] argv){
Exception e = new Exception("asdf")
System.Console.WriteLine(e.GetHashCode());
}
}
Next chapter...
What you will learn in the next chapter:
- Get to know Exception.GetType
- Syntax for Exception.GetType
- Returns for Exception.GetType
- Example - Exception.GetType
C# Exception Data
C# Exception HelpLink
C# Exception InnerException
C# Exception Message
C# Exception Source
C# Exception StackTrace
C# Exception TargetSite
C# Exception Exception()
C# Exception Exception(String)
C# Exception Exception(String, Exception)
C# Exception Equals(Object)
C# Exception Finalize
C# Exception GetBaseException
C# Exception MemberwiseClone
C# Exception ToString
C# Exception HelpLink
C# Exception InnerException
C# Exception Message
C# Exception Source
C# Exception StackTrace
C# Exception TargetSite
C# Exception Exception()
C# Exception Exception(String)
C# Exception Exception(String, Exception)
C# Exception Equals(Object)
C# Exception Finalize
C# Exception GetBaseException
C# Exception GetHashCode
C# Exception GetTypeC# Exception MemberwiseClone
C# Exception ToString