get program files path c# code example
Example 1: get program path c#
using System;
class Program
{
static void Main(string[] args)
{
string path;
path = AppDomain.CurrentDomain.BaseDirectory;
}
}
Example 2: c# how to get a file path from user
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "Custom Description";
if (fbd.ShowDialog() == DialogResult.OK)
{
string sSelectedPath = fbd.SelectedPath;
}