Understanding Interface
Interface used to establish contracts through which objects can interact with each other without knowing the implementation details. Interfaces are defined by using the interface keyword. An interface definition consists a set of signature for methods, delegates, events or indexers. An interface cannot consist of any data fields or any implementation details such as methods body. Icomparable interface A common interface defined in the system namespace is the Icomparable. Icomparable definition: interface Icomparable { int compareTo(object obj); } The Icomparale has a single method that accepts an object and returns an int. The return value of this method indicates the result of comparing the given parameter with the current object. CompareTo method documentation If the instance is equal to the parameter, CompareTo returns 0. If the parameter value is less then the instance or if...