C# 정렬
[C#] Delegate Example
1. 예제 using System; class Program { public static void Swap(ref int a, ref int b) { int temp = a; a = b; b = temp; } public static void Sort(int[] arr) { int sz = arr.GetLength(0); for(int i = 0; i arr[j]) Swap(ref arr[i], ref arr[j]); } } } static void Main() { int[] x = {1, 3, 5, 7, 9, 2, 4, 6, 8, 10}; Sort(x); foreach(int n in x) ..