tags:

views:

41

answers:

1

Hi,

I know that LoadContent and UnloadContent have a chance of being called more than once. However I am wondering if Initialize will have a chance to be called more than once. The documentation doesn't really go into this. Or is it better to do most of my "initialization" in the constructor?

Thanks,

+2  A: 

The information you are looking for is actually in the documentation for Game.Run. You can only call Game.Run once, and it calls Game.Initialize once.

The benefit of doing initialization in Initialize instead of the constructor is that, when Initialize runs, the graphics device has been created (although obviously almost all of the things you can actually do with a graphics device should be done in LoadContent).

For answering this kind of question, Reflector is helpful.

Andrew Russell
Be careful, Reflector will tell you the implementation of a method, not its contract.
Trillian