0

私は自分のアプリでユーザー ログを読む必要があります。

Environment.UserName


new System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()).Identity.Name;

System.Security.Principal.WindowsIdentity.GetCurrent().Name

しかし、これはすべて、私が使用した最後の3文字なしで名前を付けます:

UserPrincipal.Current.UserPrincipalName
UserPrincipal.Current.Name

表示される名前を教えてください

完全な長さのログイン名を取得するにはどうすればよいですか

4

1 に答える 1