Accessing Environment Settings

Bageshkumarbagi
Posted by Bageshkumarbagi under C# category on | Points: 40 | Views : 633
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(" USer Name "+ Environment.UserName);
MessageBox.Show(" User Domain Name" + Environment.UserDomainName);
MessageBox.Show("Command Line:"+ Environment.CommandLine);
MessageBox.Show("Current Directory:"+ Environment.CurrentDirectory);
MessageBox.Show("Machine Name:"+ Environment.MachineName);
MessageBox.Show("OS Version:"+ Environment.OSVersion.ToString());
MessageBox.Show("Stack Trace:"+ Environment.StackTrace);
MessageBox.Show("System Directory:"+ Environment.SystemDirectory);
MessageBox.Show("Tick Count:"+ Environment.TickCount.ToString());
MessageBox.Show("Version:"+ Environment.Version.ToString());
MessageBox.Show("Working Set:"+ Environment.WorkingSet.ToString());
MessageBox.Show("Path = " + Environment.GetEnvironmentVariable("Path"));


}

Comments or Responses

Posted by: t5j9033387989 on: 11/29/2013 Level:Starter | Status: [Member] | Points: 10
Thanks for sharing this..

Login to post response