Answer the question
In order to leave comments, you need to log in
How to determine the username?
I'm trying to determine the username that my UWP app is using. Tried through Environment.UserName, VS writes that "Environment" does not contain a definition for "UserName". What else to try?
VS2015, .NET 4.5.2
Answer the question
In order to leave comments, you need to log in
you here .
IReadOnlyList<User> users = await User.FindAllAsync(UserType.LocalUser, UserAuthenticationStatus.LocallyAuthenticated);
User user = users.FirstOrDefault();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question