It is my understanding that embedded resources are part of your assembly (executable) and therefore the only path is that to your executable. If you want to use the resource, you need to use reflection. Take a look at: How to embed and access resources using C# for more information.
The file is embedded in your assembly, it has no path. If you want a file you can work with outside of the resource interface, then consider GetManifestResourceStream from the assembly object for a little more control.
Hi Navee30 welcome at DaniWeb!
If you consider that your application executable is like a raisin cake, the resources are the raisins in the dough. They are embedded. Only your app knows how to reach them. There isn't a path to them, only to the application.
I have a text file (embedded) and I need to load it in a method ReadFile(string path). How could I do?
If you take a look at the link I posted, it contains an example of reading a text file from a resource that is embedded into your assembly using the GetManifestResourceStream that deceptikon mentioned.
Yes, but it is imperative that the method accepts a path as a parameter.. I cannot change it.
Just adding to deceptikon's post (as I was going to suggest something similar), but if you really can't read it as an embedded resource due to this restriction then why is it embedded in the first place?
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"