What I am trying to do is read the file shown below as an string array, the file is a bunch of months that are in order of the months in a year.This is done multiple times which correlate to another file that has years in. Now what i want to be able to do is allow the user to select whether or not the months are in ascending or descending order. By this I don't mean alphabetical but the order of which they are shown in the file. so it would go: (ascending) January, February,March...etc
and (descending) December, November, October....etc.
using System;

                                    string[] Month = System.IO.File.ReadAllLines(@"C\Month.txt);
                                    Array.Sort(Month);
                                    foreach(var months in Month)
                                    {
                                        Console.WriteLine("{0}",months);
                                    }

Try...
Array.Reverse(Month);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.