Skip to content

Quantity.TryParse won't parse "10 MM" because "MM" is capitalized. Other abbreviations work fine. #1423

@drepamig

Description

@drepamig

Describe the bug
Quantity.TryParse(type, string, out IQuantity value) fails to parse Length strings with capital MM (i.e., "10 MM" should parse just as easily as "10 mm"). Other abbreviations appear to work, regardless of casing.

To Reproduce
See .NET Fiddle here: http://dotnetfiddle.net/3JmUsw

Expected behavior
The string should be converted to a Length based on a millimeter value

Additional context
I believe this used to work correctly, but I'm not certain.

Thanks for this library, it's a massive time saver!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions