Choose the correct statement about the IComparer interface in C#:
A. The IComparer interface is in System.Collections
B. It defines a method called Compare(), which compares the values of two objects
C. Both a & b
D. None of the mentioned
Answer:A
Choose the correct statement about the IComparer interface in C#:
A. The IComparer interface is in System.Collections B. It defines a method called Compare(), which compares the values of two objects C. Both a & b D. None of the mentioned
Explanation: The IComparer interface is in System.Collections. It defines a method called Compare(), which compares the values of two objects. It is shown here: int Compare(object x, object y) .It returns greater than zero if x is greater than y, less than zero if x is less than y, and zero if the two values are equal.