How to get path of the system directory in C#

1 Answer

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

        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.Text = Environment.SystemDirectory;
        }
    }
}




/*
run:
 
C:\WINDOWS\system32
  
*/

 



answered Nov 19, 2023 by avibootz

Related questions

1 answer 177 views
177 views asked Jan 14, 2017 by avibootz
1 answer 191 views
191 views asked Jan 14, 2017 by avibootz
2 answers 213 views
1 answer 122 views
1 answer 162 views
2 answers 181 views
...