How to VB.Net Path Class
VB.NET provides effective ways of dealing with filenames and paths by using System.IO namespace . The Path Class performs operations on String instances that contain file or directory path information. Path Class returns a string that can contain absolute or relative location information.
The following are the some important operations in VB.Net Path Class:
GetDirectoryName - Returns the directory information for the specified path string.
GetExtension - Returns the extension of the specified path string.
GetFileName - Returns the file name and extension of the specified path string.
GetFileNameWithoutExtension - Returns the file name of the specified path string without the extension.
GetFullPath - Returns the absolute path for the specified path string.
Get Current Application Path
VB.Net Class application in System.Windows.Forms namespace has static property called ExecutablePath . Inorder to get only the folder part of the path, use static method GetDirectoryName of Path class.
applicationPath = Path.GetDirectoryName(Application.ExecutablePath)
It will return the current path of the .exe file .
- How to VB.NET Directory operations
- How to VB.NET File operations
- How to VB.NET FileStream
- How to VB.NET TextReader
- How to VB.NET Simple TextReader
- How to VB.NET TextWriter
- How to VB.NET BinaryReader
- How to VB.NET BinaryWriter
- How to convert xps file to bmp file
- How to create PDF files in vb.net
- How to convert text file to pdf
- Write database to PDF file