You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is due to the method TryGetFlagEnumValuesByName in SmartFlagEnumExtensions: The BinarySearch on the array should use a System.Collections.CaseInsensitiveComparer as third parameter in this scenario.
The text was updated successfully, but these errors were encountered:
Romuald-Szymanski
changed the title
Method FromName() and TryFromName() for SmartFlagEnum do not work with ignore case at true
Methods FromName() and TryFromName() for SmartFlagEnum do not work with ignore case at true
Apr 20, 2023
With the example of EmployeeType in documentation, when using .FromName (ou .TryFromName) with the ignore case flag, no value is returned.
IEnumerable<EmployeeType> types = EmployeeType.FromName("director, manager", true);
The issue is due to the method TryGetFlagEnumValuesByName in SmartFlagEnumExtensions: The BinarySearch on the array should use a System.Collections.CaseInsensitiveComparer as third parameter in this scenario.
The text was updated successfully, but these errors were encountered: