• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

What is the difference between this three dictionaries?

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
PagodNaUtak
Asked:
PagodNaUtak
1 Solution
 
strickddCommented:
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now