System.Security.Principal.NTAccount.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            return _name;
        }

Usage Example

Example #1
0
        internal String GetName()
        {
            // special case the anonymous identity.
            if (_safeTokenHandle.IsInvalid)
                return String.Empty;

            if (_name == null)
            {
                // revert thread impersonation for the duration of the call to get the name.
                RunImpersonated(SafeAccessTokenHandle.InvalidHandle, delegate
                {
                    NTAccount ntAccount = this.User.Translate(typeof(NTAccount)) as NTAccount;
                    _name = ntAccount.ToString();
                });
            }

            return _name;
        }
All Usage Examples Of System.Security.Principal.NTAccount::ToString