C# FileInfo ClassLast Updated : 19 Jan 2026 The FileInfo class is used to deal with file and its operations in C#. It provides properties and methods that are used to create, delete and read file. It uses StreamWriter class to write data to the file. It is a part of System.IO namespace. C# FileInfo Class SignatureC# FileInfo ConstructorsThe following table contains constructors for the FileInfo class.
C# FileInfo PropertiesThe following table contains properties of the FileInfo class.
C# FileInfo MethodsThe following table contains methods of the FileInfo class.
C# FileInfo Example: Creating a FileOutput: File is created Successfully We can see inside the F drive a file abc.txt is created. A screenshot is given below. ![]() C# FileInfo Example: writing to the fileOutput: ![]() C# FileInfo Example: Reading text from the fileOutput: ![]() Next TopicC# DirectoryInfo |
We request you to subscribe our newsletter for upcoming updates.