iComparer

  • Thread starter Thread starter mo
  • Start date Start date
M

mo

I need to sort an array that includes text enclosed with double quotes
alphabetically (and ignore the quotes) I'm trying to
implement the iComparable interface to achieve this
 
Which one are you trying to implement? IComparer or IComparable?

Basically for each one you implement a Compare method. In that method
you will compare two items of your array and return -1 if the first is
less than the second, 0 if they are equal, or 1 if the first is greater
than the second.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top