System.Resources.ResourceManager.IgnoreCase Property

Gets or sets a value that indicates whether the resource manager allows case-insensitive resource lookups in the ResourceManager.GetString(string) and ResourceManager.GetObject(string) methods.

Syntax

public virtual bool IgnoreCase { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

If the value of the ResourceManager.IgnoreCase property is false, a resource with the name "Resource" is not equivalent to the resource with the name "resource". If ResourceManager.IgnoreCase is true, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that when ResourceManager.IgnoreCase is true, the ResourceManager.GetString(string) and ResourceManager.GetObject(string) methods perform case-insensitive string comparisons by using the invariant culture. 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). However, because the comparison is conducted by using the casing rules of the invariant culture if ResourceManager.IgnoreCase is true, this comparison succeeds.

Note:

For performance reasons, it is best to always specify the correct case for your resource names. Setting ResourceManager.IgnoreCase to true can cause a significant increase in working set and a significant decline in performance.

Requirements

Namespace: System.Resources
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0