I have class Employee and I need to implement IComparable and use CompareTo method to sort employees by name. From what I've seen, I have to return 1, -1, and 0, but how do I use the strings?
Here's what I have.
class Employee : IComparable<Employee>
{
string name;
string address;
public int CompareTo(Employee obj)
{
Employee person = obj;
}
}