public static bool CreateLocalUser(string userName, string password, string userDescription = null)
{
if ((object)userName == null)
throw new ArgumentNullException(nameof(userName));
if ((object)password == null)
throw new ArgumentNullException(nameof(password));
// Remove any irrelevant white space
userName = userName.Trim();
if (userName.Length == 0)
throw new ArgumentException("Cannot create local user: no user name was specified.", nameof(userName));
if (Common.IsPosixEnvironment)
return UnixUserInfo.CreateLocalUser(userName, password, userDescription);
return WindowsUserInfo.CreateLocalUser(userName, password, userDescription);
}