If you're using a ``++struct++``, it is likely because you're interested in performance. But by failing to implement ``++IEquatable++`` you're loosing performance when comparisons are made because without ``++IEquatable++``, boxing and reflection are used to make comparisons. == Noncompliant Code Example [source,csharp] ---- struct MyStruct // Noncompliant { private int i; public int I { //... } } ---- == Compliant Solution [source,csharp] ---- struct MyStruct : IEquatable { private int i; public int I { //... } public bool Equals(MyStruct other) { throw new NotImplementedException(); } } ---- ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) include::message.adoc[] include::highlighting.adoc[] endif::env-github,rspecator-view[]