Created
June 7, 2020 17:57
-
-
Save devmnj/e060b24fa92adae394644a80c102605f to your computer and use it in GitHub Desktop.
Create folder/directory automatically in C#.Net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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