How do I loop into all the resources in the resourcemanager?
Ie: foreach (string resource in ResourceManager) //Do something with the recource.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use ResourceManager.GetResourceSet() for a list of all resources for a given culture. The returned ResourceSet implements IEnumerable (you can use foreach).
To answer Nico’s question: you can count the elements of an
IEnumerableby casting it to the genericIEnumerable<object>and use theEnumerable.Count<T>()extension method, which is new in C# 3.5: