I have a list created from a log file and I need to sort it.
I have tried list.OrderBy()
but it gives me errors and is not working.
List<string[]> list = new List<string[]>();
var logFile = File.ReadAllLines(Name1);
foreach (var item in logFile)
{
list.Add(new string[] { date_check(item), time_check(item),logType(item), device(item), rest(item) });
}
I need to sort this list by date and time. How can I do it?