TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C# Coding Standard

Rule:  7@502Checked automatically with code checker

Synopsis:Do not modify the value of any of the operands in the implementation of an overloaded operator
Severity Level:1
Category:Object oriented


This rule can be found in a non-normative clause of [C# Lang], section 17.9.1. Breaking this rule gives counter-intuitive results.

public static PatientList operator + (PatientList list, Patient p)
    list += p;
    return list;

Literature References:
C# Lang 17.9.1