Solved

What is the difference between this three dictionaries?

Posted on 2011-09-07
1
248 Views
Last Modified: 2012-05-12
What is the difference between this three dictionaries?

newDictionary1 = New Dictionary(Of String, Pen)(StringComparer.CurrentCultureIgnoreCase)

newDictionary2 = New Dictionary(Of String, Pen)(StringComparer.InvariantCultureIgnoreCase)

newDictionary3 = New Dictionary(Of String, Pen)(StringComparer.OrdinalIgnoreCase)
0
Comment
Question by:PagodNaUtak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 28

Accepted Solution

by:
strickdd earned 500 total points
ID: 36495704
Basically, in the first line, it uses the current computer settings to determine the "culture" of the language and bases the string comparison rules on that. In the secont line, it will ignore the "culture" specified by the current settings and will compare independent of it. The last line basically converts all characters to uppercase and does the comparison.

The term "culture" refers the the language selected and typeset of the keyboard (aka characters)

More information than you need to know: http://msdn.microsoft.com/en-us/library/system.stringcomparer.aspx
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question