ResXResourceReaderAllowDuplicatedKeys Property

Gets or sets whether all entries of same name of the .resx file should be returned.
Default value: .

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.0.0-rc.1
C#
public bool AllowDuplicatedKeys { get; set; }

Property Value

Boolean

Remarks

If an element is defined more than once and AllowDuplicatedKeys is , then the enumeration returns every occurrence of the entries with identical names. If AllowDuplicatedKeys is the enumeration returns always the last occurrence of the entries with identical names.

If duplicated keys are allowed, the enumeration of the .resx file is lazy for the first time. A lazy enumeration means that the underlying .resx file is read only on demand. It is possible that not the whole .resx is read if enumeration is canceled. After the first enumeration elements are cached.

Exceptions

ObjectDisposedExceptionThe Close or IDisposable.Dispose method has already been called on this ResXResourceReader instance.
InvalidOperationExceptionIn a set operation, a value cannot be specified because the XML resource file has already been accessed and is in use.

See Also