Solved

What is the difference between this three dictionaries?

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now