Can someone explain the difference between a class and a module. When do you use one versus the other? I am using C#.
Update: I do mean the C# equivalent of the VB Module.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
(Maybe I should be clear, there are no “Modules” in C# as in VB.NET’s “Module”)
There are no modules in C# (like the modules in VB or VB.NET). So, instead a module is one which is compiled and packaged into an assembly, it’s more logical.
Whereas class is a well defined entity. A module may use a class (or classes), to function. (Again the word “module” is used logically)
The word “Module” is also used in a context quite different, in System.Reflection.Module