Globals execution order?

Discussion in 'Questions (Windows Mobile)' started by agraham, Jan 11, 2009.

  1. agraham

    agraham Expert Licensed User

    A question for Erel whose answer others might want to know.

    Is the order of execution of the Globals Subs in a multi-module program guaranteed to be be the same in the IDE and when both legacy and optimised compiled?

    If so what determines the order? Is Main.Globals always last?

    The reason for asking is that Globals are useful for intialisation and it would be good to have/know a deterministic order in which they execute.
  2. Erel

    Erel Administrator Staff Member Licensed User

    The order is not deterministic and code from inside Globals should not call code from other modules.
    More "complex" initialization code should be called from App_Start.
  3. agraham

    agraham Expert Licensed User

    I wan't thinking of code but of passing initialised variable values "along the chain" so to speak from, say, the originally defined values in Main.Globals to other modules that require different initial values in different projects. However it is obviously not to be so I will have to write intialisation routines.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice