<p>I would like to get the path to the execution directory of a Windows Forms application. (That is, the directory in which the executable is located.)</p>

<p>Does anyone know of a built-in method in .NET to do this?</p>

In VB.NET
```
```
Dim directory as String = My.Application.Info.DirectoryPath
```
```
In C#
```
```
string directory = AppDomain.CurrentDomain.BaseDirectory;
```
```