我们如何在.NET Core 2.1中使用WindowsIdentity
?
它在 2.0 中可用
.NET API 浏览器
- https://learn.microsoft.com/en-us/dotnet/api/?term=WindowsIdentity&view=netcore-2.0
WindowsIdentity
可用 - https://learn.microsoft.com/en-us/dotnet/api/?term=WindowsIdentity&view=netcore-2.1
WindowsIdentity
不可用
您可以使用以下方法找到当前的 Windows 用户名:System.Environment.UserName
.