public static int SortTypeName(FishDBFishModel1_0_0 iFish1, FishDBFishModel iFish2) { //1番目のキー:FishTypeでソート if (iFish1.FishType > iFish2.FishType) { return(1); } else if (iFish1.FishType < iFish2.FishType) { return(-1); } else { //2番目のキー:FishNameでソート return(string.Compare(iFish1.FishName, iFish2.FishName)); } }
public static int SortTypeName(FishDBFishModel1_0_0 iFish1, FishDBFishModel iFish2) { //1番目のキー:FishTypeでソート if (iFish1.FishType > iFish2.FishType) { return 1; } else if (iFish1.FishType < iFish2.FishType) { return -1; } else { //2番目のキー:FishNameでソート return string.Compare(iFish1.FishName, iFish2.FishName); } }