JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

Code inspection: Type with suspicious equality is used in a record (private accessibility)

Last modified: 08 August 2024

This inspection reports suspicious non-structurally comparable types being used in C# record member types. In the example below, instances of the Payload record will be compared by having the same Header string value and the same byte[] array reference, which is very likely not how you want to compare byte arrays: