public int Compare(FileParser x, FileParser y) { if (x == null && y == null) { return(0); } int retval = x == null ? -1 : (y == null ? 1 : 0); if (retval == 0) { retval = string.Compare(x.fileName, y.fileName, true); if (retval == 0) { retval = ParsingParams.Compare(x.prams, y.prams); } } return(retval); }
int IComparer.Compare(object x, object y) { if (x == null && y == null) { return(0); } int retval = x == null ? -1 : (y == null ? 1 : 0); if (retval == 0) { FileParser xParser = (FileParser)x; FileParser yParser = (FileParser)y; retval = string.Compare(xParser.fileName, yParser.fileName, true); if (retval == 0) { retval = ParsingParams.Compare(xParser.prams, yParser.prams); } } return(retval); }