diff --git a/src/NationalInstruments.Analyzers/Properties/Resources.Designer.cs b/src/NationalInstruments.Analyzers/Properties/Resources.Designer.cs index f66160b..2573faf 100644 --- a/src/NationalInstruments.Analyzers/Properties/Resources.Designer.cs +++ b/src/NationalInstruments.Analyzers/Properties/Resources.Designer.cs @@ -581,7 +581,7 @@ internal static string NI1019_Description { } /// - /// Looks up a localized string similar to Record '{0}' has properties that are enumerable collections, but does not explicitly implement the Equals and GetHashCode methods. + /// Looks up a localized string similar to Record '{0}' has properties that are enumerable collections, but it does not explicitly implement the Equals(TRecord other) and GetHashCode methods. /// internal static string NI1019_Message { get { diff --git a/src/NationalInstruments.Analyzers/Properties/Resources.resx b/src/NationalInstruments.Analyzers/Properties/Resources.resx index e177eb5..2733957 100644 --- a/src/NationalInstruments.Analyzers/Properties/Resources.resx +++ b/src/NationalInstruments.Analyzers/Properties/Resources.resx @@ -415,10 +415,10 @@ Disposable should not have finalizer - The default implicit equality method implementation for records is to compare enumerable types by reference, not the element values; thus it is important for records with enumerable properties to explicitly implement equality and compare the enumerables using SequenceEqual or UnorderedEquals (depending on whether ordering matters). + By default, record equality is determined by calling Equals on property values. IEnumerable.Equals compares the enumerable reference, making it a poor choice for determining whether two enumerables have the same elements . Thus, you must explicitly implement Equals(TRecord other) and compare enumerable elements with SequenceEqual (if order matters) or UnorderedEquals for the comparison to make logical sense. - Record '{0}' has properties that are enumerable collections, but does not explicitly implement the Equals and GetHashCode methods + Record '{0}' has properties that are enumerable collections, but it does not explicitly implement the Equals(TRecord other) and GetHashCode methods {0} is the name of the record