Module

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

Hi all,

I have a class like the following. Is it true that the
function in the module could be called directly (globally
assessible) in other class file in the same project? What
is the equivalent coding in C#?

Regards

Simon


*******************************************************

Namespace Space
Public Module Globals
Public Function GetDBConnectionString() As String
Return ""
End Function
End Module
End Namespace

*******************************************************
 
Make a class with the sealed modifier. Then, make all of your methods and
properties static. You'll need to reference it myclass.SomeMethod instead
of SomeMethod, but C# is cool enough that it's worth it (plus it's a hell of
a lot more clear)
 
Back
Top