{{Quickfixn}} Equals and Hashcode for fields

Staffan Ulfberg staffan at ulfberg.se
Wed Nov 5 05:31:16 PST 2014


Hi,

In quickfixj, fields override the Equals and Hashcode methods which is
often useful (I could give examples but I'm sure they are pretty obvious).
Not having them is not really a problelm (since Dictionaries etc have
constructors that take the IEqualityComparer to use), but for people that
migrate from quickfixj (like me) and possible also for people that just
assume that Equals on FIX fields "just works" this is confusing.

I would suggest these methods are implemented to perform a comparison of
the tag number and value by overriding them in the FieldBase class.

If not doing so is by choice for some reason, I would suggest overriding
them to throw NotImplementedException in order to avoid hard-to-find bugs.

Staffan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20141105/c1577c71/attachment.htm>


More information about the Quickfixn mailing list