SMART FACTORY - CompareTo/List<>/Sort / 곱하기 -1 역순정렬/무명 델리게이트


SMART FACTORY - CompareTo/List<>/Sort / 곱하기 -1 역순정렬/무명 델리게이트

using System; using System.Collections.Generic; namespace ConsoleApp4 { class Program { class Product { public string Name { get; set; } public int Price { get; set; } } //static int ArraySortPrice(Product t1, Product t2) //{ // return t1.Price.CompareTo(t2.Price) * -1; //*-1을 통해서 역순 정렬 가능!! //} static int ArraySortName(Product t1, Product t2) { return t1.Name.CompareTo(t2.Name) ; } delegate int..


원문링크 : SMART FACTORY - CompareTo/List<>/Sort / 곱하기 -1 역순정렬/무명 델리게이트