- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What does the interface IStructuralEquatable do in C#?
The IStructuralEquatable interface defines methods to support the comparison of objects for structural equality, which means that two objects are equal because they have equal values.
It includes the following two methods −
|Sr.No||Method & Description|
The method determined whether an object is structurally equal to the current instance.
The methods a hash code for the current instance.
Let us see an example in which I have created Tuple objects and worked with IstructuralEquatable interface:
Create Tuples −
var tupleOne = Tuple.Create(26.3, Double.NaN, 35.6); var tupleOne = Tuple.Create(26.3, Double.NaN, 35.6);
Now check the equality by calling IStructuralEquatable.Equals using default comparer.
IStructuralEquatable chk = tupleOne; Console.WriteLine(chk.Equals(tupleTwo, EqualityComparer<object>.Default));
- What does the interface ICollection do in C#
- What does the interface IEnumerable do in C#?
- What does the interface IList do in C#?
- What does the interface ICloneable do in C#?
- What does the interface IStructuralComparable do in C#?
- What does Interface consist of in Java
- What does the method toArray() do?
- What does the pandas.series.array attribute do?
- What does the pandas.series.index attribute do?
- What does the pandas.series.values attribute do?
- What does the compareTo do in Java?
- What does the pandas series.filter() method do?
- What does the pandas DataFrame.columns attribute do?
- What does the pandas DataFrame.index attribute do?
- What does the .end() function do in jQuery?