Numeric sorting in .NET (Anthony Simmon) anthonysimmon.com
Numeric sorting, also often known as natural sorting, organizes strings in a human-logical order, considering numbers atomically. With default sorting algorithms, “v10” would be sorted before “v3” because the comparison happens character by character, while in numeric sorting, “v3” would be sorted before “v10” because “3” is considered smaller than “10”. This type of sorting is known to be more human-friendly and is used in applications like Windows Explorer. Let’s explore three ways to implement it in .NET.
Report Story
Leave Your Comment