C# Exception Equals(Object)
In this chapter you will learn:
- Get to know Exception.Equals(Object)
- Syntax for Exception.Equals(Object)
- Parameter for Exception.Equals(Object)
- Returns for Exception.Equals(Object)
- Example - Exception.Equals(Object)
Description
Exception Equals(Object)
determines whether the specified
object is equal to the current object.
Syntax
Exception.Equals(Object)
has the following syntax.
public virtual bool Equals(
Object obj
)
Parameters
Exception.Equals(Object)
has the following parameters.
obj
- The object to compare with the current object.
Returns
Exception.Equals(Object)
method returns true if the specified object is equal to the current object; otherwise, false.
Example
using System;/*ww w. java2 s. c om*/
public class MainClass{
public static void Main(String[] argv){
Exception e = new Exception("asdf")
Exception e1 = new Exception("asdf")
System.Console.WriteLine(e.Equals(e1));
}
}
Next chapter...
What you will learn in the next chapter:
- Get to know Exception.Finalize
- Syntax for Exception.Finalize
- Returns for Exception.Finalize
- Example - Exception.Finalize
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 GetBaseException
C# Exception GetHashCode
C# Exception GetType
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 FinalizeC# Exception GetBaseException
C# Exception GetHashCode
C# Exception GetType
C# Exception MemberwiseClone
C# Exception ToString