System.IO.Path
Path.*
string strExtenstion = Path.GetExtension(strPath);
string strFileName = Path.GetFileName(strPath);
string strFilePathDirectory = Path.GetDirectoryName(strPath);
Path.Combine
using System.IO;
string fullName = Path.Combine(FileDirectory, fileName);
string[] paths = {@"d:\archives", "2001", "media", "images"};
string fullPath = Path.Combine(paths);
Sources:
https://docs.microsoft.com/en-us/dotnet/api/system.io.path.combine?view=netframework-4.8
Comments