How to create folder in c#

By j Miracle

How you can create a folder using c#

           System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo("c:\\hello");
            if (!dir.Exists)
            {
                 dir.Create();
            }

it will check the directory exists or not if it is not exist then it will create the directory.

How to create folder in c#  (1007 Views)