I'm trying to make the code will reverse the order of a list from 'Monday, Tuesday ,Wednesday ,Thursday, Friday' to 'Friday, Thursday, Wednesday, Tuesday, Monday'
. Whenever I run the code all that appears is
'System.Collections.Generic.List'1[System.String]'
I think the problem may be that I have declared the elements in the list wrong.
class Program
{
static void Main(string[] args)
{
List<string> list = new List<string> (new string[]{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"});
list.Reverse();
Console.WriteLine(list);
Console.ReadLine();
}
}