public DatabaseUser RemoveWarning(bool allWarnings = false) { if (Warnings.IsEmpty()) { throw new DivideByZeroException("User has no warnings"); } if (!allWarnings) { Warnings.RemoveAt(Warnings.Count - 1); } else { Warnings.RemoveRange(0, Warnings.Count); } return(this); }
public bool RemoveWarning(bool allWarnings = false) { if (Warnings.Empty()) { return(false); } if (!allWarnings) { Warnings.RemoveAt(Warnings.Count - 1); } else { Warnings.RemoveRange(0, Warnings.Count); } return(true); }