CSharp examples for System.IO:File Path
Get Path From Full Path
using System.Text; using System.IO;// w w w .j av a 2s. c o m using System.Globalization; using System.Collections.Generic; using System; public class Main{ public static string GetPathFromFullPath(string fullPath) { return !fullPath.Contains("\\") ? Directory.GetCurrentDirectory() : fullPath.Substring(0, fullPath.LastIndexOf("\\") + 1); } }