I am implementing a caching layer between my database and my C# code. The idea is to cache the results of certain DB queries based on the parameters to the query. The database i
Take a look at the CollationInfo class. It is located in an assembly called Microsoft.SqlServer.Management.SqlParser.dll
although I am not totally sure where to get this. There is a static list of Collations (names) and a static method GetCollationInfo (by name).
Each CollationInfo
has a Comparer. It is not exactly the same as a StringComparer
but has similar functionality.
EDIT: Microsoft.SqlServer.Management.SqlParser.dll is a part of the Shared Management Objects (SMO) package. This feature can be downloaded for SQL Server 2008 R2 here:
http://www.microsoft.com/download/en/details.aspx?id=16978#SMO
EDIT: CollationInfo
does have a property named EqualityComparer which is an IEqualityComparer
.