Created
November 2, 2023 18:25
-
-
Save vipulDessai/db89a025dc490c7aab082412039a9b0b to your computer and use it in GitHub Desktop.
C# - IList to List
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class IListToListExample { | |
void static public Main(stringp[] args) { | |
IList<IList<string>> tickets = new IList<IList<string>>(); | |
// Convert | |
List<List<string>> ticketsList = new List<List<string>>(tickets.Select(x => x.ToList())); | |
// Use List functions | |
ticketsList.Sort((x, y) => x[0].CompareTo(y[0])); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment