//Visual Basic 2010 Recursie Procedures en Functies public class QuickSort { void Main() { int[] numbers; this.PrintArray(numbers); this.QuickSort(numbers, 0, 7); this.PrintArray(numbers); Console.ReadLine(); } void PrintArray(int[] values) { for (System.Collections.IEnumerator _it1 = values.GetEnumerator(); _it1.MoveNext(); ) { int value = ((int)(_it1.Current)); Console.Write((value + " ")); } Console.WriteLine(); } void QuickSort(int[] array, int lowerbound, int upperbound) { int count = ((upperbound - lowerbound) + 1); if ((count == 2)) { if ((this.array(lowerbound) > this.array(upperbound))) { int backup = this.array(lowerbound); this.array(lowerbound) = this.array(upperbound); this.array(upperbound) = backup; } } } } //Bezoek www.vbvoorbeelden.be voor meer C# voorbeelden. //Copyright - De Wolf / vbvoorbeelden - 2003-2011 - Alle rechten voorbehouden.