-1

I'm coding another C# application, and I was wondering how I can get the signed in user's username and C:\Users\ path. Will this method work? How do I get the current username in .NET using C#? ? I wasn't sure because this was for Windows XP, and things update over time.

INFO: Using Windows RT where you CANNOT run EXEs without a jailbreak, and the jailbreak limits to .NET Framework 4.5.0. I can't code fast on a Core 2 Duo.

Machavity
  • 30,841
  • 27
  • 92
  • 100

1 Answers1

1

Yes, but it's better to do the following:

string userName = Environment.UserName;

doing the other method shows the PC's domain

Grizzly
  • 66
  • 8