I am attempting to sort a List of fuses by the Designator property of the fuse.
The Fuse Model:
public class Fuse
{
public string Designator { get; set; }
public string Rating { get; set; }
public string Type { get; set; }
}
Example Data
This is an example of what a list of fuses would look like.
What I have tried:
fuses = fuses.OrderBy(f => f.Designator).ToList();
The above code sort of works, but it puts the F10 before F2. Does anyone know of a way to sort a List by the designator appropriately? I have read about natural sorting algorithms but not quite sure how to apply them correctly.
Any help would be greatly appreciated.
Thank you,