resource question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI,

I have this file called rola.cgt , does anyone know how i can embed the
rola.cgt as a resource so i wont be loading the rola.cgt as a seperate file
in C#? any help would be appreciate.. any code would be very helpful too...
thank you so much in advance!
 
In .NET 2, double click on the properties entry in your project, go to the
resources tab. (Click to create a resource file if needed) . Hit Ctrl+5 to
switch to file view.
Hit the 'Add Resource' button, and select the file. This will add it to your
project and set it to be an embedded resource.
But
Better than that. Now it your code (assuming project is call foobar) you can
say :
foobar.Resources.rola

which is a byte array containing the file. You have to love VS2K5

HTH


Ciaran O'Donnell
 
Back
Top