Returns an enumerator for this System.Resources.ResourceReader object.
An enumerator for this System.Resources.ResourceReader object.
Typically, you enumerate resources by calling the ResourceReader.GetEnumerator method and then repeatedly calling the IEnumerator.MoveNext method on the returned IDictionaryEnumerator object until the method returns false. The resource name is available from the IDictionaryEnumerator.Key property; its value from the IDictionaryEnumerator.Value property. The example illustrates how to enumerate resources in this way.
The implementation of the IDictionaryEnumerator.Value property by the System.Resources.ResourceReader class can throw the following exceptions:
System.IO.FileNotFoundException
The assembly that contains the type to which the data belongs cannot be found.
The data is not in the expected format.
The type to which the data belongs cannot be found.
You can handle the exception by calling the ResourceReader.GetResourceData(string, String@, Byte[]@) method to retrieve information about the data type and the byte array assigned to the named resource. For more information, see the "Retrieving Resources by Name with GetResourceData" section in the System.Resources.ResourceReader class topic.
The System.Resources.ResourceReader class includes two methods that return enumerators. The ResourceReader.GetEnumerator method returns an IDictionaryEnumerator interface object and is the recommended method to call when enumerating resources.