I
Irfan
hi,
I am trying to arrange a CollectionOfCars in increasing order of their
X-Cordinate location.
CollectionOfCars is a generic collection.
Dim CollectionOfCars as new list(of Car)
Here is the class Car in the simplest form
Class CarPosition
dim _location() as double
public readonly property location() as double
return _location
end property
End class
This is how i tried to sort them... but gives error
CollectionOfCars.sort(new CarComparer)
Class Car Comparer
implemnts Icomparer(of Car)
'In the above line, it gives error
"Class must implement compare function but i have already implemnted
End Class
Can someone give some ideas please
I am trying to arrange a CollectionOfCars in increasing order of their
X-Cordinate location.
CollectionOfCars is a generic collection.
Dim CollectionOfCars as new list(of Car)
Here is the class Car in the simplest form
Class CarPosition
dim _location() as double
public readonly property location() as double
return _location
end property
End class
This is how i tried to sort them... but gives error
CollectionOfCars.sort(new CarComparer)
Class Car Comparer
implemnts Icomparer(of Car)
'In the above line, it gives error
"Class must implement compare function but i have already implemnted
End Class
Can someone give some ideas please