Format:
Recent snippets matching tags of Sort
private void listUp(CheckedListBox listBox) { if (listBox.SelectedIndex == -1 || listBox.SelectedIndex == 0) return; object selected; object previous; object temp; bool selectedChecked;
21 Views
no comments
List<Product> products = new List<Product>(); products.Sort(delegate(Product p1, Product p2) { return p1.ProductName.CompareTo(p2.ProductName); });
75 Views
no comments
public class SortByName implements Sortable { @Override public File[] sort(File[] files) { File aux; for (int i = files.length; i >= 1; i--) { for (int j = 1; j < i; j++) { if (files[j] != null && files[j - 1].getName().compareTo(files[j].getName()) > 0) {
101 Views
no comments
namespace WindowsFormsApplication1 { public partial class Form1 : System.Windows.Forms.Form { public Form1() { InitializeComponent(); // create list of data var _List = new System.Collections.Generic.List<Data>
1721 Views
1 comments
public IList MergeSort(IList list) { if (list.Count <= 1) return list; int mid = list.Count / 2; IList left = new ArrayList(); IList right = new ArrayList();
317 Views
no comments
private LinkedList<Element>MergeSort(LinkedList<Element> linkedList, string sortType) { if (linkedList.Count <= 1){ return linkedList; } LinkedList<Element> left, right, result; int middle = linkedList.Count / 2; left = ReturnLinkedListSegment(0, middle, linkedList);
181 Views
no comments
public class GenericComparer<T> : IComparer<T> { public List<Tuple<string, bool>> Comparisons { get; set; } public int Compare(T x, T y) { int returnValue = 0; IComparable xval; IComparable yval;
210 Views
no comments
Lparameters toColumn Local laControlSource[1], lcAlias, lcControlSource, lcControlSourceTest, lcField, lcPicture Local lcSortDirection, lnSelect, loHeader Dimension laControlSource[1] If Type('toColumn.sorting_header') <> 'O' Return Endif
738 Views
no comments
/* --------------------------------- */ // sortari.h #include <iostream> #include <time.h> using namespace std; // Sortare prin selectie, nu prea imi place :D // O(n^2) void selectie(int sir[], int el);
217 Views
no comments
/// <summary> /// Sorts the list box in descending order /// </summary> /// <param name="pList">the list to sort</param> /// <param name="pByValue">Sort the list by values or text</param> private void SortListBox(ref ListBox pList, bool pByValue) { var lListItems = new System.Collections.SortedList(); //add listbox items to SortedList
1860 Views
no comments
/// <summary> /// Sorts the dropdownlist in descending order /// </summary> /// <param name="objDDL"></param> private void SortDropDownList(ref DropDownList objDDL) { var textList = new ArrayList(); var valueList = new ArrayList(); foreach (ListItem li in objDDL.Items)
494 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
