Object.Equals Method Determines whether the specified Object is equal to the current Object. : System Object Method « Development Class « C# / C Sharp






Object.Equals Method Determines whether the specified Object is equal to the current Object.

 

using System;
class Program
{
    static void Main(string[] args)
    {
        Object Obj1 = new Object();
        Object Obj2 = new Object();
        Console.WriteLine(Obj1.Equals(Obj2));
        Obj2 = Obj1;
        Console.WriteLine(Obj1.Equals(Obj2)); 
    }
}

   
  








Related examples in the same category

1.illustrates some of the System.Object class methodsillustrates some of the System.Object class methods
2.System Functions: LogOff, Restart, Shutdown, Hibernate, Standby
3.The Point class is derived from System.Object.
4.override Equals method
5.Build Equals method by using the Equals method from member variables
6.ValueType.Equals
7.Object.GetType Method Gets the Type of the current instance.
8.Object.MemberwiseClone Method Creates a shallow copy of the current Object.
9.Object.ReferenceEquals Method Determines whether the specified Object instances are the same instance.
10.Object.ToString Method Returns a String that represents the current Object.