this embedded

R

Rosie

evening everyone

i want to move some code from in a function thingy to in the class. its
Bitmap back = (Bitmap)Bitmap.FromStream(this.GetType().Assembly.GetManifestResourceStream("WindowsApplication1.back.gif"));

which loads the embedded resource to a new bitmap but it says that
'this' isnt available in the context - pls help me. r
 
M

Mattias Sjögren

which loads the embedded resource to a new bitmap but it says that
'this' isnt available in the context - pls help me. r

You can replace this.GetType().Assembly with
typeof(YourClass).Assembly or Assembly.GetExecutingAssembly().


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top