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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top