FileInfo class in C# FileInfo is a class of System.IO namespace and it is useful to perform file operations such as create, read, delete, rename, moving, opening and appending to files. The FileInfo class will provide the same functionality as File class to manipulate the files but if we are performing multiple operations on the single file, then it’s more efficient to use FileInfo class methods instead of File class methods. FileInfo class is having a different type of properties and methods to perform operations on files. FileInfo Properties The following are the different type of properties which are provided by the FileInfo class to retrieve the information about files. Property Description Directory This property will return an instance of the parent directory of a file. DirectoryName It is...
Csharp Naija is a blog that teaches C# programming using a practical guide. C# Nigeria is here to guide interested individual to the world of software Engineering.