An array is a group of like-typed variables that are referred to by a common name. And each data item is called an element of the array. Equals(Object) method which is inherited by Array class from object class is used to check whether an array is equal to another array or not.
public virtual bool Equals (object obj);
Here, obj is the object which is to be compared with the current object.
Return Value: This method return true if the specified object is equal to the current object otherwise it returns false.
Below programs illustrate the use of above-discussed method:
False False True
Note: If the current instance is a reference type, the Equals(Object) method checks for reference equality.
- Array.BinarySearch(Array, Object) Method with examples in C#
- C# | Array.BinarySearch(Array, Object, IComparer) Method
- Object and Dynamic Array in C#
- C# | Array.BinarySearch(Array, Int32, Int32, Object, IComparer) Method
- Array.BinarySearch(Array, Int32, Int32, Object) Method with examples in C#
- C# | Copying the SortedList elements to an Array Object
- C# | Check whether a SortedList object contains a specific key
- C# | Check if a SortedList object contains a specific value
- C# | Check if a SortedList object is synchronized
- C# | Check if a SortedList object has a fixed size
- C# | Check if a SortedSet object is a proper subset of the specified collection
- C# | Check if a SortedSet object is a proper superset of the specified collection
- C# | Object Class
- C# | Class and Object
- C# | Add an object to the end of Collection<T>
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.