The keys within a section are case sensitive, but the dictionary used to store them has an ambiguous comparer object. The Hash function is case sensitive, but the equality function is not:
fEntries := TDictionary<string,string>.Create(
TDelegatedEqualityComparer<string>.Create(
function(const Left, Right: string): Boolean
begin
Result := SameText(Left, Right, loInvariantLocale);
end,
function(const Value: string): Integer
begin
Result := ElfHash(Value);
end
)
);
To ensure consistency the equality function should changed to be case sensitive:
function(const Left, Right: string): Boolean
begin
Result := SameStr(Left, Right, loInvariantLocale);
end,
The keys within a section are case sensitive, but the dictionary used to store them has an ambiguous comparer object. The Hash function is case sensitive, but the equality function is not:
To ensure consistency the equality function should changed to be case sensitive: