KGy SOFT

ResXResourceReaderAllowDuplicatedKeys Property

KGy SOFT Core Libraries Help
Gets or sets whether all entries of same name of the .resx file should be returned.
Default value: .

Namespace:  KGySoft.Resources
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public bool AllowDuplicatedKeys { get; set; }

Property Value

Type: Boolean
Exceptions

ExceptionCondition
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.
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.

Note Note
To be compatible with the System.Resources.ResXResourceReader class set the value of this property to .
See Also

Reference