System.IO.Path

In the past, manipulating paths (such as removing a file name) required writing your own string manipulation routines. Table 12-4 lists the most commonly used members of the Path class. The beauty of the Path class is its ability to perform its duties quickly and easily; calling a single method is much easier than writing code to process a string. In addition, its parsing methods, such as GetExtension, take into consideration the platform-specific separator character so that you don’t have to worry about such details.

Table 12-4. Useful Members of the Path Class
Member Description
DirectorySeparatorChar Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file ...

Get Practical Standards for Microsoft® Visual Basic® .NET, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.