Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
很容易确定运行我的 C# .NET 4.0 控制台应用程序的用户是否是本地管理员组的成员。我也在尝试确定它是否在 LocalSystem 下运行。最好的方法是什么?
WindowsIdentity.GetCurrent().User.IsWellKnown(WellKnownSidType.LocalSystemSid)