Skip to content

Instantly share code, notes, and snippets.

@vipulDessai
Created November 2, 2023 18:25
Show Gist options
  • Save vipulDessai/db89a025dc490c7aab082412039a9b0b to your computer and use it in GitHub Desktop.
Save vipulDessai/db89a025dc490c7aab082412039a9b0b to your computer and use it in GitHub Desktop.
C# - IList to List
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