how to read images collection from a resource file using c#.net? RRS feed

  • Question

  • hi

    i have some collection of images in resource file .how to read that collection images .

    can u pls help me.

    Friday, September 24, 2010 6:39 AM


  • Hi,

    In fact, I have replied to you in your another thread, although it is that read string collection, instread of image collection, we can use the same way to read it, here is a sample:

    ResourceSet resources = Resources.ResourceManager.GetResourceSet(

    new System.Globalization.CultureInfo("en"), false, true);


                IDictionaryEnumerator resourceList = resources.GetEnumerator();


                while (resourceList.MoveNext())


                    string value;

                    Image p;


                    string key = (string)resourceList.Key;

                    if (resourceList.Value is Image)


                        p = (Image)resourceList.Value;


                    else if (resourceList.Value is string)


                        value = (string)resourceList.Value;




    Best regards,
    Guang-Ming Bian - MSFT

    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    • Marked as answer by warrentang Thursday, September 30, 2010 3:10 AM
    Wednesday, September 29, 2010 3:10 AM