A chain of https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/selection-statements#the-if-statement[if/else if] statements is evaluated from top to bottom. At most, only one branch will be executed: the first statement with a condition that evaluates to `true`.
Therefore, duplicating a condition leads to unreachable code inside the duplicated condition block. Usually, this is due to a copy/paste error.
\[~ann.campbell.2] should I add the See section for C# as well?
=== on 25 Mar 2015, 16:24:48 Ann Campbell wrote:
\[~tamas.vajk] these language-specific subtasks override portions of their parent tasks, and the description field is treated as 5 separate parts: description, Noncompliant Code Example, Compliant Solution, Exceptions, and references (See). There's no need to copy/paste the references to this child ticket, but do include them in the implementation's rule description.