I have some code that outputs data from each array, but I was just wondering for my twoData array is there a way so that the user can see the dates in either ascending or descending order. At the moment it outputs like:
16/03/2015 13/02/2015 12/02/2015 03/02/2015 02/02/2015 30/01/2015 29/01/2014 28/01/2014 27/01/2014 26/01/2013 23/01/2013 22/01/2013
Thanks.
static void Main(string[] args)
{
//int ctr = 0;
string[] oneData = File.ReadAllLines("One.txt");
string[] twoData = File.ReadAllLines("Two.txt");
Console.WriteLine("Which array would you like to view?");
string input = Console.ReadLine();
Console.Write("\n");
if (input.ToLower() == "one")
Console.Write(string.Join("\n", oneData));
else if(input.ToLower() == "two")
Console.Write(string.Join("\n", twoData));
}