I don't get how I'm supposed to sort this list by date.. I only know how to sort when its DateTime format or an int. Maybe I'm doing something completly wrong since I'm new.
Do I need to do a second list/array with DateTime? I've tried but I couldn't figure out how to connect it. And when I tried doing a bubble sort it didn't work because of the lists format
List<string> msgBoard = new List<string>(); string info = new string; Console.WriteLine("\tTitle: "); string title = Console.ReadLine(); info = title; Console.WriteLine("\tMessage: "); string msg = Console.ReadLine(); info = msg; string date = DateTime.Now.ToString("yyyy/MM/dd"); info = date; msgBoard.Add(info);
All I want to do is to sort the list by using the dates I'll save.