Hi
I have an object array:
object[] a = new object[100];
the array handles int, double, strings and other types which implements IComparable. And I allways check that the objects I put in the array are of the same type, so its either all ints or string etc..
Now, what I want to do is to compare the object using CompareTo, but the compiler complains..
this is the error I get:
'object' does not contain a definition for 'CompareTo'
Is there anyway to go around this problem without Implementing the IComparable myself? Cause I know that the object I want to compare is comparable..
Hope you understand my question. Thanks in advance
I have an object array:
object[] a = new object[100];
the array handles int, double, strings and other types which implements IComparable. And I allways check that the objects I put in the array are of the same type, so its either all ints or string etc..
Now, what I want to do is to compare the object using CompareTo, but the compiler complains..
this is the error I get:
'object' does not contain a definition for 'CompareTo'
Is there anyway to go around this problem without Implementing the IComparable myself? Cause I know that the object I want to compare is comparable..
Hope you understand my question. Thanks in advance