I have an enum with six distinct values:
One Two Three Four Five Six
which is filled from a config file (i.e. string)
Let's say someone writes into the config file any of the values
- On
- one
- onbe
or other common misspellings/typos, I want to set the most similar value from the enum (in this case, "One") instead of throwing up.
Does C# have something like that builtin or will I have to adapt an existing Edit Distance algorithm for C# and hook that into the enum?