こんだけ!><;
public enum OrderIs : int { LT = -1, EQ = 0, GT = 1 }
public static class CsOrdering { public static OrderIs Order(IComparable left, IComparable right) { return (OrderIs)left.CompareTo(right); } }
使い方><
//2と3てどっちが大きいswitch (CsOrdering.Order(2, 3)){ case OrderIs.EQ: {//以下略
思考の /dev/null