Hi, I'm having trouble implementing the IComparable interface with my custom class. Here's my code:
class ClassName : IComparable
{
public ClassName(){}
public int Compare(object obj1, object obj2)
{
return 1;
}
}
Obviously don't need to fill it with any more code, when trying to compile, it says "ClassName does not implement interface member 'System.IComparable.CompareTo(object)'
What am I missing here?
Thanks
class ClassName : IComparable
{
public ClassName(){}
public int Compare(object obj1, object obj2)
{
return 1;
}
}
Obviously don't need to fill it with any more code, when trying to compile, it says "ClassName does not implement interface member 'System.IComparable.CompareTo(object)'
What am I missing here?
Thanks