Click here to Skip to main content
16,019,768 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionPrinting in vb.net Pin
maildummy23-May-12 21:07
maildummy23-May-12 21:07 
QuestionReading the contents of a file into an array Pin
GeorgieMPorgie23-May-12 6:19
GeorgieMPorgie23-May-12 6:19 
AnswerRe: Reading the contents of a file into an array Pin
Luc Pattyn23-May-12 6:40
sitebuilderLuc Pattyn23-May-12 6:40 
GeneralRe: Reading the contents of a file into an array Pin
GeorgieMPorgie23-May-12 6:55
GeorgieMPorgie23-May-12 6:55 
AnswerRe: Reading the contents of a file into an array Pin
Eddy Vluggen23-May-12 10:34
professionalEddy Vluggen23-May-12 10:34 
GeneralRe: Reading the contents of a file into an array Pin
GeorgieMPorgie23-May-12 15:55
GeorgieMPorgie23-May-12 15:55 
GeneralRe: Reading the contents of a file into an array Pin
Eddy Vluggen24-May-12 0:22
professionalEddy Vluggen24-May-12 0:22 
GeneralRe: Reading the contents of a file into an array Pin
proneal24-May-12 11:02
proneal24-May-12 11:02 
VB
Dim stocksymbolarrayLong() As String
Dim filecount As Integer
'Count the lines in the file you are reviewing.

Dim LongFile As System.IO.StreamReader
LongFile = System.IO.File.OpenText("C:\Users\George Desktop\Documents\Stock System\Stock Programs\Stock Program Data\LongStockTesting.txt")

filecount = 0

Do Until LongFile.Peek = -1
    LongFile.ReadLine()
    ReDim Preserve stocksymbolarrayLong(filecount)
    stocksymbolarrayLong(filecount) = LongFile.ReadLine
    filecount = filecount + 1
Loop

LongFile.Close()
' Sort the array's
If Not stocksymbolarrayLong Is Nothing Then
    Array.Sort(stocksymbolarrayLong)
End If



I did a little reworking USING your method of getting the values.
There is better one, readALlLines from the IO.File class, but I used ur code.

This should work , but I can't test it.
Good luck!
AnswerRe: Reading the contents of a file into an array Pin
Luc Pattyn24-May-12 11:53
sitebuilderLuc Pattyn24-May-12 11:53 
GeneralRe: Reading the contents of a file into an array Pin
proneal24-May-12 11:56
proneal24-May-12 11:56 
GeneralRe: Reading the contents of a file into an array Pin
proneal24-May-12 11:58
proneal24-May-12 11:58 
GeneralRe: Reading the contents of a file into an array Pin
Luc Pattyn24-May-12 12:08
sitebuilderLuc Pattyn24-May-12 12:08 
AnswerRe: Reading the contents of a file into an array Pin
Dave Kreskowiak23-May-12 7:20
mveDave Kreskowiak23-May-12 7:20 
GeneralRe: Reading the contents of a file into an array Pin
GeorgieMPorgie23-May-12 7:49
GeorgieMPorgie23-May-12 7:49 
AnswerRe: Reading the contents of a file into an array Pin
Luc Pattyn23-May-12 13:56
sitebuilderLuc Pattyn23-May-12 13:56 
GeneralRe: Reading the contents of a file into an array Pin
GeorgieMPorgie23-May-12 15:48
GeorgieMPorgie23-May-12 15:48 
AnswerRe: Reading the contents of a file into an array Pin
frostcox25-May-12 10:37
frostcox25-May-12 10:37 
GeneralRe: Reading the contents of a file into an array Pin
GeorgieMPorgie25-May-12 16:27
GeorgieMPorgie25-May-12 16:27 
QuestionVB Remoting - How do you get the server to pass value to client? Pin
Cutha22-May-12 19:57
Cutha22-May-12 19:57 
AnswerRe: VB Remoting - How do you get the server to pass value to client? Pin
Bernhard Hiller23-May-12 4:14
Bernhard Hiller23-May-12 4:14 
GeneralRe: VB Remoting - How do you get the server to pass value to client? Pin
Cutha24-May-12 14:57
Cutha24-May-12 14:57 
QuestionCrystal Report 8.5 Connectivity(Parameterised or data as per record set) with Oracle using VB6 Pin
compad22-May-12 0:09
compad22-May-12 0:09 
QuestionRe: Crystal Report 8.5 Connectivity(Parameterised or data as per record set) with Oracle using VB6 Pin
Eddy Vluggen22-May-12 9:05
professionalEddy Vluggen22-May-12 9:05 
AnswerRe: Crystal Report 8.5 Connectivity(Parameterised or data as per record set) with Oracle using VB6 Pin
compad22-May-12 22:33
compad22-May-12 22:33 
GeneralRe: Crystal Report 8.5 Connectivity(Parameterised or data as per record set) with Oracle using VB6 Pin
Eddy Vluggen23-May-12 0:18
professionalEddy Vluggen23-May-12 0:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.