WindowsIdentity.GetCurrent Method (Boolean)
Assembly: mscorlib (in mscorlib.dll)
true to return the WindowsIdentity only if the thread is currently impersonating; false to return the WindowsIdentity of the thread if it is not impersonating or the WindowsIdentity of the process if the thread is currently impersonating.
Return ValueA WindowsIdentity object that represents a Windows user.
If ifImpersonating is true and the thread is not impersonating, the returned WindowsIdentity object has no value. If ifImpersonating is false and the thread is impersonating, the WindowsIdentity for the thread is returned. If ifImpersonating is false and the thread is not impersonating, the WindowsIdentity for the process is returned.
Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.