Hello there,

I have a single module that can be called by several modules.
for each of these several modules, I have Globale variables related to them.

if I call my unique module with Module1, I want the single Module to work with Module1 Global variable, if it's called from Module2, then we use module 2...

short example:

Code:
private void Module1()
{
        SingleModule(ModuleName)
}

private void Module2()
{
        SingleModule(ModuleName)
}

private void SingleModule(string ModuleName)
{
      if ( GlobaleVariable == true)
          GlobalVariable = false;
}
so in this example, the variable name of [GlobalVariable] should differ based on the module calling the Single Module.

I know I could get around by using a SWITCH / CASE in my SingleModule for each seperated module calling it, but there's gotta be a better way, since the use of a SWITCH /CASE would involve programming change in my SingleModule each time I create another module calling it...


your help would be greatly appreciated...

thanks.