public void Sort() { SortStrategy.Sort(_list); foreach (string item in _list) { Console.WriteLine(" {0} \n", item); } }
public void Sort() { _sortStrategy.Sort(_list); foreach (var name in _list) { Console.WriteLine(" " + name); } Console.WriteLine(); }
public void Sort() { _sortedStrategy.Sort(_list); foreach (var item in _list) { Console.WriteLine($" {item}"); } }
public void Sort() { _sortStrategy.Sort(_list); foreach (string name in _list) { Console.WriteLine($" {name}\n"); } }
public void Sort() { _sortStrategy.Sort(_list); foreach (string name in _list) { Console.WriteLine(" {0}", name); } Console.WriteLine(); }
public void Sort() { _sortstrategy.Sort(_list); // Iterate over list and display results foreach (string name in _list) { Console.WriteLine(" " + name); } Console.WriteLine(); }
public void Sort() { _sortStrategy.Sort(_list); foreach (var item in _list) { Console.WriteLine($"Itens {item}"); } Console.Read(); }
public void Sort() { sortStrategy.Sort(this.list); foreach (string name in this.list) { Console.WriteLine(" " + name); } Console.WriteLine(); }
public void Sort() { _sortstrategy.Sort(_list); // Iterar sobre la lista y mostrar resultados foreach (string name in _list) { Console.WriteLine(" " + name); } Console.WriteLine(); }
public void Sort() { var watch = System.Diagnostics.Stopwatch.StartNew(); _sortstrategy.Sort(_list); watch.Stop(); var elapsedMs = watch.Elapsed; foreach (int cnt in _list) { Console.Write(" " + cnt); } Console.WriteLine(elapsedMs); }
// The Context void ButtonClick(object sender, EventArgs e) { Button control = sender as Button; SortStrategy <T> strategy = SelectStrategy(control.Name); IEnumerable <T> newlist = Generator(); DrawGraph(newlist); if (strategy == null) { return; } // DrawGraph will be invoked during sorting when the UpdateUI event is triggered strategy.UpdateUI += new Action <IEnumerable <T> >(DrawGraph); strategy.Sort(newlist); }
public void Sort() { sortstrategy.Sort(list); }
public void Sort() { _sortStrategy.Sort(_list); }
public void Sort() { sortStrategy.Sort(ref array); }