Why is this an issue?
An assertion is a piece of code that’s used during development when the compilation debug mode is activated. It allows a program to check itself as
it runs. When an assertion is true, that means everything is operating as expected.
In non-debug mode, all
Debug.Assert are automatically left out. So, by contract, the boolean expressions that are evaluated by those
assertions must absolutely not contain any side effects. Otherwise, when leaving the Debug mode, the functional behavior of the application is not the
The rule will raise if the method name starts with any of the following
SetEquals will be
Noncompliant code example
bool result = list.Remove("dog");