VB GlobalMultise Class

  • Thread starter Thread starter Gonçalo Boléo
  • Start date Start date
G

Gonçalo Boléo

Can i have in C# classes that are like VB6 classes GlobalMultiUse?
I have a class with general functions supporting my programming and i don't
wan't to instanciate it in every class that i need to use it.

thanks,
Gonçalo Boléo
 
Mark the functions with the "static" keyword.
To call them, use ClassName.FunctionName
No instance required. Technically, this is a little different from
GlobalMultiUse since COM requires instances and under the covers it's not
quite the same, but the end effect is what you're looking for.

-Rob Teixeira
 
Rob Teixeira said:
Mark the functions with the "static" keyword.
To call them, use ClassName.FunctionName
No instance required. Technically, this is a little different from
GlobalMultiUse since COM requires instances and under the covers it's not
quite the same, but the end effect is what you're looking for.

It can be a good idea to mark the constructor of this class as private.

Michael
 
Thanks
I think this is what i want

Rob Teixeira said:
Mark the functions with the "static" keyword.
To call them, use ClassName.FunctionName
No instance required. Technically, this is a little different from
GlobalMultiUse since COM requires instances and under the covers it's not
quite the same, but the end effect is what you're looking for.

-Rob Teixeira
 
Back
Top