I need to determine whether a Dictionary I receive in a function has a case-insensitive comparer.
ie. A case insensitive dictionary is declared like so:
var myDict = new Dictionary<string, decimal>(StringComparer.OrdinalIgnoreCase);
When I receive the dictionary into my function I can access the .Comparer property and check its type - however all I seem to get is -
System.Collections.Generic.EqualityComparer<string>
How can I find out if the Comparer being used is StringComparer.OrdinalIgnoreCase?