ResXResourceReaderGetAliasEnumerator Method

Provides an IDictionaryEnumerator instance that can retrieve the aliases from the current XML resource file or stream.

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public IDictionaryEnumerator GetAliasEnumerator()

Return Value

IDictionaryEnumerator
An IDictionaryEnumerator for that can be used to iterate through the aliases from the current XML resource file or stream.

Remarks

The IDictionaryEnumerator.Value property of the returned enumerator is always a String regardless of the value of the SafeMode property.

The IDictionaryEnumerator.Key property of the returned enumerator is the alias name, whereas IDictionaryEnumerator.Value is the corresponding assembly name.

If AllowDuplicatedKeys property is , then this method returns a lazy enumerator for the first time meaning the .resx file is parsed only during the enumeration. When any of the enumerators are obtained for the second time, a cached enumerator is returned with the whole parsed .resx content. If duplicates are disabled, the lastly defined value will be returned of a redefined alias.

See also the Remarks section of the ResXResourceReader class for examples.

See Also