iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
Use an ArrayList, then iterate backwards
using System;
using System.Collections;
using System.IO;
namespace SortedList
{
class Program
{
static void Main(string[] args)
{
ArrayList stringList = new ArrayList();
StreamReader stringReader = new StreamReader("c:\\OptionList.txt");
string option = "";
while ((option = stringReader.ReadLine()) != null)
{
stringList.Add(option);
}
stringReader.Close();
stringReader.Dispose();
stringList.TrimToSize();
for (int i = stringList.Count - 1; i >= 0; --i)
{
Console.WriteLine(stringList[i]);
}
Console.ReadLine();
}
}
}
You'll have to translate to VB syntax cos I can't stand VB syntax it makes my teeth jangle! And besides gotta leave you with something to do.
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68