Imports System.IO Module Module1 Sub Main() Dim readFromFile As StreamReader Dim FileName1 As String FileName1 = "C:\Documents and Settings\Administrator\Desktop\Anthony\Week 11 Homework\File Read and Display\Data\numbers.dat" readFromFile = File.OpenText(FileName1) If File.Exists(FileName1) Then Do Until readFromFile.EndOfStream Console.WriteLine(readFromFile.ReadLine()) Loop Else Console.WriteLine("File Could not be found. Exiting program!") End If Console.WriteLine("Press When you are Finished press any key to exit.") Console.ReadKey() readFromFile.Close() End Sub End Module
' declare an empty array ... readFromFile = File.OpenText(FileName1) If File.Exists(FileName1) Then Do Until readFromFile.EndOfStream ' add the next value to the array Loop ' Sort the array ' for each value in array ' print value ' end of loop 'for each' Else
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)