reading from resources in project

Hi guys :)

i need help with reading from a resource file in my project, i have tried searching through the MSDN and Knowledge Base but i didn't find anything.

I have 2 Resource files in my project.
Can someone please help me with this

Thanks in advance.



Answer this question

reading from resources in project

  • jetsetwilly

    Thank you, but i am stil having problem with opening the file since it is embedded in the project.
    The code i found over there, helps with reading from a file outside the project.

    How can i access and read/change a value in the resource file


  • dana_lotus

  • Stefan de Vogelaere

    thank you really much :D you saved me a very long time :)

    thank you once again :D


    EDIT:
    this does not work with .resx file...


  • Yiannis Piros

    If you want to read a resource from the current assembly, create a ResourceManager and get your object:



    ResourceManager rm = new ResourceManager("items", Assembly.GetExecutingAssembly());
    string text = rm.GetString("text");
    Image image = (Image)rm.GetObject("myimage");

     


  • reading from resources in project