How to make folder with C#

1 Answer

0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string dir = @"D:\Test";
        
            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }
        }
    }
}




/*
 * run:
 *
 * 
 * 
 */

 



answered Aug 22, 2023 by avibootz

Related questions

1 answer 131 views
2 answers 117 views
117 views asked Sep 2, 2023 by avibootz
1 answer 135 views
...