Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:30:17+00:00 2026-06-04T03:30:17+00:00

Concretely what is the difference between String.Compare(String, String, StringComparison) and String.Compare(String, String, CultureInfo, CompareOptions)

  • 0

Concretely what is the difference between

  • String.Compare(String, String, StringComparison) and
  • String.Compare(String, String, CultureInfo, CompareOptions)

I feel like that the second one offers more options (comparison using any culture instead of only the current one or invariant one, ignore special characters, ignore the width of katakanas (!!) etc…) than the first one. Both have been introduced it in .NET 2.0 so I guess it can’t be a question of backward compatibility.

So what’s the difference and when should I use the first one and when should I use the second one?

I had a look at this post and this article, but I think they’re dealing with a slightly different matters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:30:18+00:00Added an answer on June 4, 2026 at 3:30 am

    Your answer is in the remarks for the second overload.

    http://msdn.microsoft.com/en-us/library/cc190529.aspx

    “The comparison uses the culture parameter to obtain culture-specific information, such as casing rules and the alphabetical order of individual characters. For example, a particular culture could specify that certain combinations of characters be treated as a single character, that uppercase and lowercase characters be compared in a particular way, or that the sort order of a character depends on the characters that precede or follow it.”

    The other overload just uses the default culture.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been told that there is a performance difference between the following code
read many posts about the difference between the 3 idioms. But got more confused,
How would one implement shuffle for the Celestial Jukebox? More precisely, at each time
The javadoc for javax.servlet.http.HttpServletResponse is a little vague on the difference between what rules
I tried to looked in to difference between pl/sql procedure and function and found
I am wondering if I have the correct understanding of the theoretical difference between
I am studying macros and found many sources and questions regarding difference between macros
in my project I'm pulling data from a .plist, more concretely from an NSDictionary.
Is there any ways to do strings concatination in a `build.xml file? Concretely, suppose
I have a concrete class that contains a collection of another concrete class. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.