system.io.directorynotfoundexception c#

C#
if (!Directory.Exists(appDataPath)) 
{
     Directory.CreateDirectory(appDataPath);
}
Source

Also in C#: