Global Bitmap variables. Is it possible?

  • Thread starter Thread starter Alex Gray
  • Start date Start date
A

Alex Gray

Hi,

I have a "master bitmap" which contains all the images my app will
use. It's way to big to be put as an embedded resource.

I wanted to create a "public const Bitmap variable" which i load only
once at the start of the app, similar to how i handle global
variables, but i can't seem to find a way to do this. I don't want to
constantly be loading the enormous bitmap in all my classes!

Is there a way to do this?

-alex-
 
You can't make it a constant, but you can make the variable Readonly and
Static. You could load the image in the static constructor so that it is
available when your class is used.
 
Back
Top