Home » Tag Archives:list

Tag Archives: list

Swap two items in List<T>

December 5, 2017 c# Leave a comment

Questions: Is there a LINQ way to swap the position of two items inside a list<T>? Answers: Check the answer from Marc from C#: Good/best implementation of Swap method. public static void Swap&l...

Sort a list alphabetically

December 5, 2017 c# Leave a comment

Questions: I have the following class: class Detail { public Detail() { _details = new List<string>(); } public IList<string> Details { get { return _details; } } private readonly List<...