You will often need to get the filename from a path or append a filename with any path string. Although you can simply use simple string concatenation and methods, while doing this you should take care many problems like, whether “/” is already there at the end of the path string otherwise you need to append “/” along with filename. The .NET Framework team has considered this problem. using the System.IO.Path class makes it a lot easier for you when dealing with paths. The System.IO.Path class is a utility class that enables you to quickly perform some common operations such as determining whether a file name extension is part of a path, combining two strings into one path string, finding filename or extension from a path.
Changes the extention of a particular path.
Combines an array of paths.
Returns the directory information for the specified path string.
Returns the extension of the specified path string.
Returns the file name and extention of the specified path string.
Returns the absolute path for the specified path string.
Determines whether a path includes a file name extension.

Methods Description
Combine GetDirectoryName GetExtension GetFileName GetFullPath HasExtension


Leave a Reply