![]() True to its name, the CreateText method creates a text file and returns a System.IO.StreamWriter object. For our text file work, we will use the CreateText and OpenText methods. This class contains methods for many common file operations, including copying, deleting, file attribute manipulation, and file existence. I will look specifically at working with text files using classes from the System.IO namespace.īefore we jump into working with text files, we need to create a new file or open an existing one. NET framework provides several classes for working with text files, binary files, directories, and byte streams. NET, Microsoft introduced a new, object-oriented method for working with files. The basic file-handling commands had not changed just a few more features had been added. Later, when I learned Visual Basic, I was shocked to see that the same file operations existed in VB. The OPEN command with the file number looked quite confusing, so I never wrote the program. Years ago, when I first learned to program in BASIC, I came across a sample program for reading a text file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |