DA0011: Expensive CompareTo
Rule Id |
DA0011 |
Category |
.NET Framework Usage |
Profiling methods |
Sampling .NET Memory |
Message |
CompareTo functions should be cheap and not allocate any memory. Reduce complexity of CompareTo function if possible. |
Rule type |
Warning |
Cause
The CompareTo method of the type is expensive or allocates memory.
Rule Description
CompareTo methods should be efficient and should not allocate memory.
How to Fix Violations
Reduce the complexity of the CompareTo method.