This looks like a bug (ColumnNameComparer is taken from SqliteDataReader
1.0.89):
var idxs = new Dictionary<string, int>(new ColumnNameComparer());
idxs.Add("Xyz", 1);
idxs.Add("Abc", 2);
bool exists;
exists = idxs.TryGetValue("Abc", out i); // true => ok
exists = idxs.TryGetValue("abc", out i); // false => BUG
Note also that idxs.Add(null, 3) throws an exception. It means null string
can't be added to the dictionary. (Which seems to be a reason behind using
ColumnNameComparer.)
In my opinion ColumnnNameComparer should be replaced by
StringComparer.OrdinalIgnoreCase.
Jan Slodicka
--
View this message in context:
http://sqlite.1065341.n5.nabble.com/System-Data-SQLite-version-1-0-89-0-released-tp71904p72636.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users