How do I get the Windows user name in a C# application?
Solution:
It's located in Environment.UserName, this will show you a dialog box with your Windows user name.
MessageBox.Show(Environment.UserName);
A development blog from a hobby game programmer. Current tools are Visual Studio C# express 2008, Paint.NET, TortoiseSVN and a homemade unit test framework.
No comments:
Post a Comment