GSF.Identity.UserInfo.RemoveLocalUser C# (CSharp) Méthode

RemoveLocalUser() public static méthode

Removes local user if it exists.
was null. No was specified. Could not remove local user.
public static RemoveLocalUser ( string userName ) : bool
userName string User name to remove if it exists.
Résultat bool
        public static bool RemoveLocalUser(string userName)
        {
            if ((object)userName == null)
                throw new ArgumentNullException(nameof(userName));

            // Remove any irrelevant white space
            userName = userName.Trim();

            if (userName.Length == 0)
                throw new ArgumentException("Cannot remove local user: no user name was specified.", nameof(userName));

            if (Common.IsPosixEnvironment)
                return UnixUserInfo.RemoveLocalUser(userName);

            return WindowsUserInfo.RemoveLocalUser(userName);
        }