I am using Windows Azure Storage Tables, and want to query for an object. The user inputs a string, which I look for in the database as such:
var myKey = \"SomeC
Using ==
is the same as .Equals(..)
, as it just calls that method.
You can force to use a case sensitive comparison using an overload of Equal() passing a string.comparison
enum
CurrentCulture Compare strings using culture-sensitive sort rules and the current culture.
CurrentCultureIgnoreCase Compare strings using culture-sensitive sort rules, the current culture, and ignoring the case of the strings being compared.
InvariantCulture Compare strings using culture-sensitive sort rules and the invariant culture.
InvariantCultureIgnoreCase Compare strings using culture-sensitive sort rules, the invariant culture, and ignoring the case of the strings being compared.
Ordinal Compare strings using ordinal sort rules.
OrdinalIgnoreCase Compare strings using ordinal sort rules and ignoring the case of the strings being compared.
more info at:
http://msdn.microsoft.com/en-us/library/system.stringcomparison.aspx