private int HandlerComparison(TouchHandler x, TouchHandler y) { int comparison = 0; if ((int)x.Priority < (int)y.Priority) { comparison = -1; } else if ((int)x.Priority > (int)y.Priority) { comparison = 1; } return comparison; }