C# get directory name
<p>I have a folder in <code>c:\program files(x86)\company\application\</code> which contains all the app files.</p>

<p>How can I get the path like <code>C:\program files(x86)\company</code>?</p>

<p>I cannot use <code>Application.Startuppath</code> as it will return <code>c:\program files)x86)\company\application</code>.</p>

<p>Thanks.</p>
