Click here to Skip to main content
15,906,574 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Displaying a Variable? [EDITED] Pin
Dave Kreskowiak17-Mar-05 4:57
mveDave Kreskowiak17-Mar-05 4:57 
GeneralRe: Displaying a Variable? [EDITED] Pin
pn199517-Mar-05 5:18
pn199517-Mar-05 5:18 
Generala record delete problem Pin
Anonymous17-Mar-05 0:13
Anonymous17-Mar-05 0:13 
GeneralRe: a record delete problem Pin
Sebastien Lachance17-Mar-05 6:57
Sebastien Lachance17-Mar-05 6:57 
GeneralWindows 2000 Server Pin
ga051016-Mar-05 4:38
sussga051016-Mar-05 4:38 
Generalreading a .txt file for data in VB .NET Pin
bizjosh16-Mar-05 2:17
bizjosh16-Mar-05 2:17 
GeneralRe: reading a .txt file for data in VB .NET Pin
Christian Graus16-Mar-05 15:38
protectorChristian Graus16-Mar-05 15:38 
GeneralRe: reading a .txt file for data in VB .NET Pin
Dr_Lomax18-Mar-05 4:59
Dr_Lomax18-Mar-05 4:59 
Dim reader as new System.IO.Streamreader(full file path)

'This is a serial reader, so once you iterate, you cannot go to the previous line unless you reopen the file and iterate to the patricular line number

'Say you want to read your data which is in the format xx,yy,zz

Dim str as String
Dim split_str() as String 'Dynamic String Array
str = reader.readLine() 'Assuming your data is in the first line of the file

split_str = str.split(',')

'You will get an array which made by tokenizing string using "," as the delimiter. Now split_str(0) = xx, split_str(1) = yy, split_str(2) = zz. You can further parse them to the required format that you want for further prcessing.

'Do not forget

reader.close()


Go to MSDN.com and verify the syntax for String.split(args[]). The context is the same but the delimiter might be a char or string or ASCII code, you might wanna verify that. I think that should help you get started on reading text files.
GeneralRe: reading a .txt file for data in VB .NET Pin
j1webb18-Mar-05 12:13
j1webb18-Mar-05 12:13 
QuestionDo you know why its happened? Pin
Mohamed Ishak15-Mar-05 23:59
professionalMohamed Ishak15-Mar-05 23:59 
GeneralPropertyGrid - Internet Explorer hosting problem Pin
Member 88279715-Mar-05 19:11
Member 88279715-Mar-05 19:11 
GeneralRe: PropertyGrid - Internet Explorer hosting problem Pin
Member 88279717-Mar-05 20:21
Member 88279717-Mar-05 20:21 
GeneralCrossWord puzzle alogrithm Pin
Mohsen Saad15-Mar-05 18:06
Mohsen Saad15-Mar-05 18:06 
GeneralRe: CrossWord puzzle alogrithm Pin
Colin Angus Mackay16-Mar-05 0:14
Colin Angus Mackay16-Mar-05 0:14 
GeneralCrystal Report:The LoadSaveReportException: Load Report Error Pin
Bing Chen15-Mar-05 10:41
Bing Chen15-Mar-05 10:41 
QuestionHow to send info out the lpt port????? Pin
mjvone15-Mar-05 10:09
mjvone15-Mar-05 10:09 
AnswerRe: How to send info out the lpt port????? Pin
Christian Graus15-Mar-05 10:47
protectorChristian Graus15-Mar-05 10:47 
QuestionHow can I make Control Array in VB.net Pin
Suman Singh15-Mar-05 10:07
professionalSuman Singh15-Mar-05 10:07 
AnswerRe: How can I make Control Array in VB.net Pin
Ray Cassick15-Mar-05 10:50
Ray Cassick15-Mar-05 10:50 
AnswerRe: How can I make Control Array in VB.net Pin
pfsoft16-Mar-05 20:17
pfsoft16-Mar-05 20:17 
Generalcolor in a combobox items Pin
wgalafassijr15-Mar-05 9:28
wgalafassijr15-Mar-05 9:28 
GeneralRe: color in a combobox items Pin
Tom John15-Mar-05 9:41
Tom John15-Mar-05 9:41 
GeneralRe: color in a combobox items Pin
wgalafassijr15-Mar-05 9:53
wgalafassijr15-Mar-05 9:53 
QuestionHow to change Column name in Datagrid Pin
Suman Singh15-Mar-05 9:06
professionalSuman Singh15-Mar-05 9:06 
AnswerRe: How to change Column name in Datagrid Pin
eshban28416-Mar-05 3:01
eshban28416-Mar-05 3:01 

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.