0

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);
                                    }
2
Contributors
1
Reply
10
Views
1 Year
Discussion Span
Last Post by Suzie999
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.