Sometimes it's necessary to read all resource key/value pair at once. I am using Dictionary<string, string> to store the returned data:
Dictionary<string, string> result = new Dictionary<string, string>();
ResourceManager manager = new ResourceManager(typeof(MyResourceClassName));
ResourceSet resources = manager.GetResourceSet(CultureInfo.CurrentCulture, true, true);
IDictionaryEnumerator enumerator = resources.GetEnumerator();
while (enumerator.MoveNext())
{
result.Add((string)enumerator.Key, (string)enumerator.Value);
}
return result;