Click button to edit
Sorting: Sort Big File without Record Class 1
Shows how to sort a big file without a record class
Implements External Sorting (wikipedia)
You don't need to declare a record class to sort a file, you can sort with a compare method
SortingWithoutRecord.cs
// Sort comparing the raw lines
var sorter = new BigFileSorter((x, y) =>
string.Compare(x, y, StringComparison.Ordinal));
sorter.Sort("unsorted.txt", "sorted.txt");