While writing a code, I had a requirement to use the programfiles folder to pull out some files from there.

Here is the code to get it:

Console.WriteLine(System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));