I have a Resource File which contains some images and I need to access these images in the runtime. The name of the image that has to be read (and displayed in PictureBox) is chosed randomly . Is it possible to access objects in Resource File when I only know a name (string)?

Thanks for any help

ResourceSet resourceSet = MyResourceClass.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true);

foreach (DictionaryEntry entry in resourceSet){
        string resourceKey = entry.Key;
        object resource = entry.Value;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.