Results 1 to 3 of 3

Thread: [Resolved] Module?

  1. #1

    Thread Starter
    Addicted Member Pythagoras's Avatar
    Join Date
    Feb 2005
    Location
    Greece
    Posts
    137

    [Resolved] Module?

    What component is the equivilent to a vb.net "Module", in c#?
    Last edited by Pythagoras; Jan 1st, 2006 at 11:36 AM.
    Visual Studio.Net 2003

    "Every man has been made by God in order to acquire knowledge and contemplate."
    --Pythagoras

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Module?

    When a VB.NET module is compiled it is implemeted as a NotInheritable (sealed in C#) class with all Shared (static in C#) members with a single Private constructor. If you create a NotInheritable class with all Shared members in VB.NET or a sealed class with all static members in C# and a single Private constructor you have basically reproduced the behaviour of a VB.NET module. The one exception is the fact that all Shared/static class members must be qualified in code with the class name, whereas module members need only be qualified with their namespace.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member Pythagoras's Avatar
    Join Date
    Feb 2005
    Location
    Greece
    Posts
    137

    Re: Module?

    Thank You for the quick reply!!!!
    Visual Studio.Net 2003

    "Every man has been made by God in order to acquire knowledge and contemplate."
    --Pythagoras

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width