Difference between revisions of "Visual Basic .net"
From ScienceZero
Line 2: | Line 2: | ||
==Files== | ==Files== | ||
+ | |||
+ | '''Reading text files line by line:'''<br /> | ||
+ | <code> | ||
+ | Dim f1 As Long | ||
+ | dim filestring as string | ||
+ | |||
+ | f1 = FreeFile() | ||
+ | FileOpen(f1, My.Application.Info.DirectoryPath & "\filename.txt", OpenMode.Input)<br /> | ||
+ | Do Until EOF(f1)<br /> | ||
+ | :filestring=LineInput(f1)<br /> | ||
+ | Loop<br /> | ||
+ | FileClose(f1)<br /> | ||
+ | </code> | ||
==Arrays== | ==Arrays== |
Revision as of 08:44, 27 December 2009
Graphics
Files
Reading text files line by line:
Dim f1 As Long
dim filestring as string
f1 = FreeFile()
FileOpen(f1, My.Application.Info.DirectoryPath & "\filename.txt", OpenMode.Input)
Do Until EOF(f1)
- filestring=LineInput(f1)
Loop
FileClose(f1)