Tangible Software Solutions

The Most Trusted Name in Source Code Conversion

C# Equivalent to VB Modules

The closest equivalent to a VB module is a static class in C# 2.0 and above (or a sealed C# class with static members prior to 2.0).  One difference is that VB allows you to specify module members from elsewhere in a project without qualifying the member call with the module name (Instant C# inserts these qualifiers into the converted C# code).  Another difference is that you cannot instantiate a VB module.  In C# 2.0 or above, labeling the class as static will prevent instantiation.  To prevent instantiation in C# prior to 2.0 just include a private constructor.

If you need to convert between VB and C# and you are depending on the results being reliable and accurate, then you will want to have Instant C#, the best VB to C# converter, or Instant VB, the best C# to VB converter, at your fingertips.

Copyright © 1997 - 2017 Tangible Software Solutions Inc.