How to get the network domain name associated with the current user 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.UserDomainName;
        }
    }
}




/*
run:
 
KTP-F89L20GQ
  
*/

 



answered Nov 19, 2023 by avibootz

Related questions

1 answer 182 views
2 answers 262 views
1 answer 234 views
234 views asked Jan 14, 2017 by avibootz
...