Subscribe Now: freedictionary

Add to The Free Dictionary

Sunday, 18 March 2012

VB.Net Tutorial - Read Text File using VB6


In classic VB reading a file is not that easy as we do in vb.net. The first and easy way to access a text file is using the simple file open method available in classic Visual Basic. Using this method, we can allocate a unique file number for opening the file. further the same number has to be used for closing the file handle.

In addition to this, there are various modes a file can be opened. Some of them are Append, Binary, Input, Output, or Random. By default Random will be used.

Read text file in VB.Net

In VB.net we can read files very easily. The System.IO namespace contains really very useful set of functions which can reduce the effort and time in coding file related activities. One of the easiest is reading a text file into string System.IO.File.ReadAllText(FilePath).

Source code

Form1.Vb

Public C ...
Read more here:   Vb.Net Read Text File 

No comments:

Post a Comment

comment.........

Engineering -Thinks of Words

Subscribe Now: google

Add to Google Reader or Homepage