Export (0) Print
Expand All

ResourceManager.IgnoreCase Property

Gets or sets a Boolean value indicating whether the current instance of ResourceManager allows case-insensitive resource lookups in the GetString and GetObject methods.

Namespace:  System.Resources
Assembly:  mscorlib (in mscorlib.dll)

public virtual bool IgnoreCase { get; set; }

Property Value

Type: System.Boolean
A Boolean value indicating whether the case of the resource names should be ignored.

If the value of the IgnoreCase property is false, a resource with the name "Resource" is not equivalent to the resource with the name "resource". If IgnoreCase is true, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that when IgnoreCase is true, the ResourceManager.GetString and ResourceManager.GetObject methods perform case-insensitive string comparisons using CultureInfo.InvariantCulture. The advantage is that results of case-insensitive string comparisons performed by these methods are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures.

For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). If IgnoreCase is true, this comparison succeeds.

NoteNote

For performance reasons, it is best to always specify the correct case for your resource names. IgnoreCase can cause a significant workingset and performance hit.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft