File handling is a very crucial and important feature to many enterprise applications around us. To support this feature Microsoft .NET Framework offers the System.IO namespace, which provides various classes to enable the developers achieve I/O functionality.
In this article, you will learn how to work with classes in the System.IO namespace for reading and writing data to and from files. System.IO also provides features to support manipulation of files and directories on the operating system’s file system.
- Using File class for reading and writing data.
- Using File and FileInfo class to manipulate files.
- Using DirectoryInfo and Directory class to manipulate directories.