[Csharp] most programmers use the bubble algorithm when writing sorting algorithms. Why? This algorithm is the simplest, easier to understand, and easier to write. However, the bubble algorithm is not efficient. Today, we will write a c # Quick sorting algorithm. If you don't need to talk about it, go directly to the Code: [csharp] using System; using System. collections. generic; using System. linq; using System. text; namespace QuickSortDemo {class QuickSort {public void Sort (int [] arr) {sortMethd (arr, 0, arr. length-1);} private void sortMethd (int [] arr, int left, int right) {if (left <right) {int key = arr [(left + right) /2]; int I = left-1; int j = right + 1; while (true) {/* The key here **/while (arr [++ I] <key); while (arr [-- j]> key ); if (I> = j) {break;} swap (arr, I, j);} sortMethd (arr, left, I-1); sortMethd (arr, j + 1, right) ;}} private void swap (int [] arr, int I, int j) {int temp = arr [I]; arr [I] = arr [j]; arr [j] = temp ;}}}