Note: This Information may include platform information,Operating System version,Username, Machine name,.NET Framework version,environment variable values etc...
The code is shown below:
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace SystemEnvironment
- {
- public partial class Form1: Form
- {
- public Form1()
- {
- InitializeComponent();
- info();
- }
- private void info()
- {
- label1.Text = Environment.CurrentDirectory;
- label2.Text = Environment.UserDomainName;
- label3.Text = Environment.UserName;
- label4.Text = Environment.OSVersion.ToString();
- label5.Text = Environment.MachineName;
- label6.Text = Environment.StackTrace;
- }
- }
- }
Thanks.!!