Object.Equals Method tells whether the specified Object is equal to the current Object. : Object « Development « VB.Net






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

 

Imports System
Imports System.IO

Class Program
    Public Shared Sub Main(ByVal args As String())
        Dim Obj1 As New Object()
        Dim Obj2 As New Object()
        Console.WriteLine(Obj1.Equals(Obj2))
        Obj2 = Obj1
        Console.WriteLine(Obj1.Equals(Obj2))
    End Sub
End Class

   
  








Related examples in the same category

1.Object Class Supports all classes in the .NET Framework class hierarchy
2.Create your own Equals method
3.Create Equals method based on Equals method from fields
4.Create Complex Structure with Equals and GetHashCode method
5.Object.GetType Method Gets the Type of the current instance.
6.Object.MemberwiseClone Method Creates a shallow copy of the current Object.
7.Object Class Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes.
8.Object.GetType Method Gets the Type of the current instance.
9.Object.MemberwiseClone Method Creates a shallow copy of the current Object.
10.Object Class Supports all classes in the .NET Framework class hierarchy
11.Object.GetType Method Gets the Type of the current instance.
12.Object.MemberwiseClone Creates a shallow copy of the current Object.
13.No implementation. All members are inherited from Object
14.Overrides ToString function