Gets the Windows account token for the user.
Assembly: mscorlib (in mscorlib.dll)
Do not explicitly release the account token that is returned by the property. The token is released by the Dispose method, which you can call in code. Dispose is also automatically called by the garbage collector.
The account token that is returned by the property is a duplicate of the Windows token that is used to create the WindowsIdentity object and is automatically released by the .NET Framework. This is different from the account token (the userToken parameter for the constructor), which is used to create the WindowsIdentity object. userToken is a Windows account token that is created by a call to LogonUser and must be closed to avoid a memory leak.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.