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!

Re: embedding resource by news

news
Fri Sep 15 08:21:13 CDT 2006

Rain,

Add the file to you project and make sure the build action property for the
file is set to "Embedded Resource"

In the code you can use:
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Namespace.yourfile.extention")
which returns a stream.

Hope this helps.
Jeroen


"Rain" <Rain@discussions.microsoft.com> schreef in bericht
news:657400BF-3CFC-410C-91A7-23F5095CEBFA@microsoft.com...
> 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!



Re: embedding resource by news

news
Fri Sep 15 08:27:40 CDT 2006

And something usefull, for if you get excetions when calling this function,
you can check the file names in the assembly with the function
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames();

"news.demon.nl" <no@mail> schreef in bericht
news:12gla6c28866v47@corp.supernews.com...
> Rain,
>
> Add the file to you project and make sure the build action property for
> the file is set to "Embedded Resource"
>
> In the code you can use:
> System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Namespace.yourfile.extention")
> which returns a stream.
>
> Hope this helps.
> Jeroen
>
>
> "Rain" <Rain@discussions.microsoft.com> schreef in bericht
> news:657400BF-3CFC-410C-91A7-23F5095CEBFA@microsoft.com...
>> 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!
>
>