Solved

What is the difference between this three dictionaries?

Posted on 2011-09-07
1
246 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 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