Results 1 to 10 of 10

Thread: [RESOLVED] DLL - Class or Module?

Hybrid View

  1. #1
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: DLL - Class or Module?

    Making a class and marking every public method static seems silly, no?
    No, not really... because 1) that's what's going on behind the scenes anyways... 2) the concept of a module is VB-specific... C# doesn't have anything like it (short of doing it all by hand). So in general terms of learning OOD/OOP ... no, it doesn't seem silly, but logical. The use of a module file simply takes the mundane out of having to do it yourself.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: DLL - Class or Module?

    So tech, you think it makes absolutely no difference whether a module or a class with all its membres static is used? Or is it better to use the class since that is what it really is anyway?
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

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

    Re: DLL - Class or Module?

    Quote Originally Posted by techgnome View Post
    the concept of a module is VB-specific... C# doesn't have anything like it (short of doing it all by hand).
    A VB module is equivalent to a C# static class. If you declare a class static in C# then declaring a non-static member will produce a compilation error. The two compile to the same IL. The module concept in VB is in keeping with VB6 modules.
    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

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