System.Management.Automation.SessionStateUnauthorizedAccessException.CreateVariableNotRemovableError C# (CSharp) Метод

CreateVariableNotRemovableError() статический приватный Метод

static private CreateVariableNotRemovableError ( PSVariable variable ) : SessionStateUnauthorizedAccessException
variable PSVariable
Результат SessionStateUnauthorizedAccessException
        internal static SessionStateUnauthorizedAccessException CreateVariableNotRemovableError(PSVariable variable)
        {
            string message = String.Format("Cannot remove variable {0} because it is constant or read-only. If the variable is read-only, try the operation again specifying the Force option.", variable.Name);
            return CreateError(variable, message, "VariableNotRemovable");
        }