We recommend using Visual Studio 2017

Searching and Sorting

 

The latest version of this topic can be found at Searching and Sorting.

Use the following functions for searching and sorting.

Searching and Sorting Functions

FunctionSearch or Sort.NET Framework equivalent
bsearchBinary searchSystem::Collections::ArrayList::BinarySearch
bsearch_sA more secure version of bsearch.System::Collections::ArrayList::BinarySearch
_lfindLinear search for given valueSystem::Collections::ArrayList::Contains
_lfind_sA more secure version of _lfindSystem::Collections::ArrayList::Contains
_lsearchLinear search for given value, which is added to array if not foundNot applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
_lsearch_sA more secure version of _lsearchNot applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
qsortQuick sortSystem::Collections::ArrayList::Sort
qsort_sA more secure version of qsortSystem::Collections::ArrayList::Sort

Run-Time Routines by Category

Show: