Skip to content

Instantly share code, notes, and snippets.

@devmnj
Created June 7, 2020 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devmnj/e060b24fa92adae394644a80c102605f to your computer and use it in GitHub Desktop.
Save devmnj/e060b24fa92adae394644a80c102605f to your computer and use it in GitHub Desktop.
Create folder/directory automatically in C#.Net
using System.IO;
public static void AutoCreateDirectory(string dpath)
{
try
{
if (!Directory.Exists(dpath))
{
Directory.CreateDirectory(dpath);
}
}
catch (Exception ee)
{
MessageBox.Show(ee.Message.ToString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment