Reference equals : Object Reference : Class C# Examples


C# Examples » Class » Object Reference »

 

Reference equals









    
public  class  MyClass
{
      public  MyClass(    )
      {
      }
      
}

public  class  MainClass
{
      static  void  Main()
      {
            MyClass  referenceA  =  new  MyClass(    );
            MyClass  referenceB  =  new  MyClass(    );

            System.Console.WriteLine(  "Result  of  Equality  is  {0}",  referenceA  ==  referenceB  );
      }
}
    
   
  
   



Output

Result of Equality is False


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Class
» Object Reference