C Sharp System.IO Namespace

C# System.IO Namespace

The IO related classes, structures, delegates, and enumerations in C# along with the classes for file and directory support are included in the System.IO namespace. For reading and writing data to files or data streams, the IO related classes can be used.

C# System.IO Namespace Classes:

The classes residing inside the System.IO namespace are listed below.

ClassUses
BinaryReaderFor reading primitive data types as binary values in a specific encoding.
BinaryWriterFor writing primitive types in binary to a stream.
BufferedStreamFor adding a buffering layer to read and write operations on another stream. It is a sealed class.
DirectoryFor exposing the static methods for creating, moving and enumerating through directories and subdirectories. It is a sealed class.
DirectoryInfoFor exposing the instance methods for creating, moving and enumerating through directories and subdirectories. It is a sealed class.
DirectoryNotFoundExceptionFor handling the exception related to the file or directory that cannot be found.
DriveInfoFor accessing the information on a drive.
DriveNotFoundExceptionFor handling the drive not found exception.
EndOfStreamExceptionFor handling the end of stream exception.
ErrorEventArgsFor facilitating the data for the FileSystemWatcher.Error event.
FileFor facilitating the static methods for the creation, copying, deletion, moving and opening of a single file.
FileFormatExceptionFor handling the file format exception.
FileInfoFor facilitating the properties and instance methods for the creation, copying, deletion, moving and opening of files.
FileLoadExceptionFor handling the file load exception.
FileNotFoundExceptionFor handling the file load exception.
FileNotFoundExceptionFor handling the file not found exception.
FileStreamFor facilitating a Stream for a file, supporting both synchronous and asynchronous read and write operations.
FileSystemEventArgsFor facilitating the data for the directory events.
FileSystemInfoFor facilitating the base class for both FileInfo and DirectoryInfo objects.
FileSystemWatcherFor listening to the file system change notifications and for raising events when a directory or file in a directory changes.
InternalBufferOverflowExceptionFor handling the internal buffer overflow exception.
InvalidDataExceptionFor handling the invalid data exception.
IODescriptionAttributeTo set the description visual designers to display while referencing an event, extender or property.
IOExceptionFor handling the I/O errors. It is an exception class.
MemoryStreamFor creating a stream whose backing store is memory.
PathFor performing the operations on String instances that contain file or directory path information.
PathTooLongExceptionFor handling the path too long exception. It is an exception class.
PipeExceptionFor handling the pipe related exception. It is an exception class.
RenamedEventArgsFor facilitating the data for the Renamed event.
StreamFor facilitating a generic view of a sequence of bytes. It is an abstract class.
StreamReaderFor implementing a TextReader to read characters from a byte stream.
StringReaderFor implementing a TextReader to read from a string.
StringWriterFor implementing a TextWriter for writing information to a string that is saved in an underlying StringBuilder.
TextReaderFor representing a reader to read a sequential series of characters.
TextWriterFor representing a writer to write a sequential series of characters.
UnmanagedMemoryAccessorFor facilitating the random access to unmanaged blocks of memory from managed code.
UnmanagedMemoryStreamFor facilitating the access to unmanaged blocks of memory from managed code.

System.IO Namespace Structures:

The structures residing inside the System.IO namespace are listed below.

StructureUses
WaitForChangedResultTo contain the information about the change that occurred.

System.IO Namespace Delegates:

The delegates residing inside the System.IO namespace are listed below.

DelegatesUses
ErrorEventHandlerTo specify the method for handling the Error event of a FileSystemWatcher object.
FileSystemEventHandlerTo specify the method for handling the Changed, Created or Deleted event of a FileSystemWatcher class.
RenamedEventHandlerTo specify the method for handling the renamed event of a FileSystemWatcher class.

System.IO Namespace Enumerations:

The enumerations residing inside the System.IO namespace are listed below.

EnumerationUses
DriveTypeTo specify the constants for drive types including CDRom, Fixed, Network etc.
FileAccessTo specify the constants for read, write or read/write access to a file.
FileAttributesTo facilitating the attributes for files and directories.
FileModeTo define the way to open a file by the operating system.
FileOptionsTo specify the advanced options to create a FileStream object.
FileShareTo add constants to control the kind of access other FileStream objects can have to the same file.
HandleInheritabilityTo determine whether the underlying handle is inheritable by child processes.
NotifyFiltersTo define the changes to watch for in a file or folder.
SearchOptionTo determine whether to search the current directory or the current directory and all subdirectories.
SeekOriginTo define the position in a stream to use for seeking.
WatcherChangeTypesTo specify the changes that might occur to a file or directory.
Content Protection by DMCA.com
Please Share