VB.NET Module and C#

  • Thread starter Thread starter Kevin Jackson
  • Start date Start date
Not exactly. But a class with all static members is basically the same
(that's what a module gets compiled to behind the scenes)
 
Kevin,
Is there anyting in C# equivilent to the VB.NET module?

No, the closest you get right now is a class with only static members
and a private constructor.

In the next version of C# there's a new feature called "static
classes" which adds some additional constraints and gets you even
closer to the VB Module behavior.



Mattias
 
OK, that's what I was looking for. I'm porting a couple VB.NET
ServicedComponents (a few have .bas modules) to C#. My plan is to create a
public class with static methods as you recommended.

Thanks,

Kevin
 

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

Back
Top