IComparable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I have a class implements IComparable interface, however, I got a error on the following method

protected override int IComparable.CompareTo(object value

..


Does anyone know the reason? one thing question is what is the difference between string and String in C#

Thanks in advance

Simon
 
Hi Simon,

Is this class implementing IComparable?
Why do you override it?


Simon said:
Hi all,

I have a class implements IComparable interface, however, I got a error on the following method.

protected override int IComparable.CompareTo(object value)
{
...
}

Does anyone know the reason? one thing question is what is the difference
between string and String in C#?

None.
 
Try changing the signature to "public int CompareTo(object value)".

Simon said:
Hi all,

I have a class implements IComparable interface, however, I got a error on the following method.

protected override int IComparable.CompareTo(object value)
{
...
}

Does anyone know the reason? one thing question is what is the difference
between string and String in C#?
 
Back
Top