question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query: Consider translating String.Equals(String, StringComparison) for selected values of StringComparison

See original GitHub issue

Currently we support the == operator and the String.Equals(String) methods which both have the same behavior in-memory as String.Equals(String, StringComparison.Ordinal). We could also support the latter without making significant changes and possibility other values of StringComparsion such as OrdinalIgnoreCase by applying LOWER() on both operands.

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:50
  • Comments:110 (51 by maintainers)

github_iconTop GitHub Comments

7reactions
TanvirArjelcommented, Oct 8, 2019

@xperiandri Still does not work in 3.0 I was shocked that it doesn’t! 😂😂

7reactions
xperiandricommented, Aug 3, 2018

Maybe you would add Roslyn analyzer that will display info about that in design time? Because having this warning in runtime is not an excellent experience.

Read more comments on GitHub >

github_iconTop Results From Across the Web

String.Equals() not working as intended
Use the String.Compare() as it can be translated to Sql. Here are some examples of string matching in Linq, with the Sql translation...
Read more >
Best Practices for Comparing Strings in .NET
Don't use an overload of the String.Compare or CompareTo method and test for a return value of zero to determine whether two strings...
Read more >
JavaScript String Comparison – How to Compare Strings in ...
You may want to compare two strings to know which is higher or lower alphabetically or to see if they are equal.
Read more >
String Comparison
I fixed it by converting both strings to binary and using the "compare" function of the binary API. This method works, however I...
Read more >
Compare strings in C#
Use the Equals() method to compare strings case-insensitive using StringComparison parameter. Example: Copy. string str1 = "LONDON"; string str2 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found