iComparer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mo

    #1

    iComparer

    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

  • Chris Dunaway

    #2
    Re: iComparer

    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.

    Comment

    Working...