This project is read-only.
1

Closed

InvalidOperation in ApproximatelyEquals

description

If you call ApproximatelyEquals with an empty options argument, or with just UseHammingDistance and pass two strings of unequal length, there will be an InvalidOperationException thrown by the expression comparisonResults.Average() because comparisonResults is empty.

A simple fix is to put this after all the comparisons have been done:
        if (comparisonResults.Count == 0)
            return false;
Cheers
  • rick
Closed May 10, 2015 at 5:35 PM by kevinjones

comments

wrote May 10, 2015 at 5:35 PM

Resolved with changeset 95788: Fixes for Work Item 11755 and Feature for Work Item 11050.