StephenCleary / Comparers

The last comparison library you'll ever need!
MIT License
427 stars 33 forks source link

Static constructors not always run #34

Closed StephenCleary closed 3 years ago

StephenCleary commented 3 years ago

In the example code for EquatableBase declare a DefaultComparer property in the derived type to make sure that the static constructor has run. This will prevent users from getting null when using DerivedType.DefaultComparer (as I have repeatedly).

(from #32)