473,480 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Modules days numbered?

With as class and object oriented .Net is, is the concept of general
modules days numbered?

When did you last add a general module to your project, and why
wouldn't you have used a class instead?
Sep 1 '08 #1
8 1202
You can create a class with Shared Methods and it behaves like a Module and
you can create a Module and it becomes a class with Shared Methods.

Try this tool http://www.red-gate.com/products/reflector/. This will give u
a better understanding of the inside implementation.

Regards,

Trevor Benedict
MCSD

"Zamdrist" <za******@gmail.comwrote in message
news:85**********************************@m3g2000h sc.googlegroups.com...
With as class and object oriented .Net is, is the concept of general
modules days numbered?

When did you last add a general module to your project, and why
wouldn't you have used a class instead?

Sep 1 '08 #2
"Zamdrist" <za******@gmail.comwrote in message
news:85**********************************@m3g2000h sc.googlegroups.com...
With as class and object oriented .Net is, is the concept of general
modules days numbered?

When did you last add a general module to your project, and why
wouldn't you have used a class instead?
System.Math?
Sep 1 '08 #3
This has nothing at all to do with the question/thought I posted.

On Sep 1, 12:23*am, "Trevor Benedict" <trevorn...@gmail.comwrote:
You can create a class with Shared Methods and it behaves like a Module and
you can create a Module and it becomes a class with Shared Methods.

Try this toolhttp://www.red-gate.com/products/reflector/. This will give u
a better understanding of the inside implementation.

Regards,

Trevor Benedict
MCSD

"Zamdrist" <zamdr...@gmail.comwrote in message

news:85**********************************@m3g2000h sc.googlegroups.com...
With as class and object oriented .Net is, is the concept of general
modules days numbered?
When did you last add a general module to your project, and why
wouldn't you have used a class instead?
Sep 1 '08 #4
Actually, it does have to do with the subject of your post. This is how the
Reflector shows an example module decompiled.

Friend NotInheritable Class MyModule
' Methods
Public Shared Sub FooBar()
Public Shared Function Sqrt(ByVal x As Double) As Double
End Class


"Zamdrist" wrote:
This has nothing at all to do with the question/thought I posted.

Sep 1 '08 #5
Then perhaps I worded my post wrongly.

There are Class Modules, and general modules.

If one writes a completely OO program in Visual Studio, would there be
a need for general modules...and therefore, given how OO .Net is, do
general modules become irrelevant, a could they in fact be removed as
a 'feature' from future versions of Visual Studio.

On Sep 1, 9:37*am, Family Tree Mike
<FamilyTreeM...@discussions.microsoft.comwrote:
Actually, it does have to do with the subject of your post. *This is how the
Reflector shows an example module decompiled.

Friend NotInheritable Class MyModule
* * ' Methods
* * Public Shared Sub FooBar()
* * Public Shared Function Sqrt(ByVal x As Double) As Double
End Class

"Zamdrist" wrote:
This has nothing at all to do with the question/thought I posted.
Sep 1 '08 #6
If one writes a completely OO program in Visual Studio, would there be
a need for general modules...and therefore, given how OO .Net is, do
general modules become irrelevant, a could they in fact be removed as
a 'feature' from future versions of Visual Studio.
Strictly speaking, you mean "Visual Basic", not "Visual Studio" - it is
rather telling that a ground-up .NET language (i.e. C#) doesn't have the
concept of modules - just the facility to have a static class.

Ultimately they compile to the same thing; the biggest issue is
backwards compatibility. If the next version of VB didn't support them I
imagine there would be an outcry from the VB devs who use them.

Marc
Sep 1 '08 #7
Indeed, and my original thought is, the days of general modules in
VB.Net (as you rightly point out) are numbered, especially given
Microsoft's track record.

On Sep 1, 10:02*am, Marc Gravell <marc.grav...@gmail.comwrote:
If one writes a completely OO program in Visual Studio, would there be
a need for general modules...and therefore, given how OO .Net is, do
general modules become irrelevant, a could they in fact be removed as
a 'feature' from future versions of Visual Studio.

Strictly speaking, you mean "Visual Basic", not "Visual Studio" - it is
rather telling that a ground-up .NET language (i.e. C#) doesn't have the
concept of modules - just the facility to have a static class.

Ultimately they compile to the same thing; the biggest issue is
backwards compatibility. If the next version of VB didn't support them I
imagine there would be an outcry from the VB devs who use them.

Marc
Sep 1 '08 #8

"Marc Gravell" <ma**********@gmail.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>If one writes a completely OO program in Visual Studio, would there be
a need for general modules...and therefore, given how OO .Net is, do
general modules become irrelevant, a could they in fact be removed as
a 'feature' from future versions of Visual Studio.

Strictly speaking, you mean "Visual Basic", not "Visual Studio" - it is
rather telling that a ground-up .NET language (i.e. C#)
I'm not sure I would agree that C# is 'ground-up' .NET language. It makes a
number of concessions to C++ that I don't think a truely'green field'
language would have made. For example in VB one has to be explicit about
what methods are intended as implementations of which interface members.
However since C++ allowed such things happen implicitly and hence C# does
also. Personally the potential of unintended behaviour (an existing class
member can unintentionly become an implementation of a newly added interface
member) makes the explicit approach more desirable. VB language designers,
not having any inheritance baggage, choose a more explicit approach.

Why would a 'ground-up' .NET language choose to use a type called int
instead of Int32? Because it helps C++/Java devs.

--
Anthony Jones - MVP ASP/ASP.NET

Sep 2 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2044
by: Dan Williams | last post by:
Hi people I've just joined the Python list and although I'm sure my question must be asked fairly frequently, I have been unable to find an answer after two days of searching. For the record, my...
3
1841
by: Caleb Hattingh | last post by:
Hi all I saw it on a webpage a few days ago, can't seem to find it again. Tried a google search for "pypy needed translate C modules" but that didn't turn up what I was looking for. ...
2
1549
by: Negroup | last post by:
Hi, first of all sorry for boring you with a such simple request. I'm using Python since few days, and I like it even if I'm not yet in confidence. I'd like to organize my programs in hierarchical...
2
6640
by: Mike Nau | last post by:
I've been trying to get a concrete answer to this for the last few days, but have come up short. I'm hoping someone here can help. Is there a way to take a set of c# modules (c# code compiled...
3
1724
by: PCC | last post by:
I need to be able to redirect web requests from certain parties to specific content. In the old days I would have used ISAPI to do this. Now days I am wondering if I should be doing this using...
2
3366
by: Hank | last post by:
Hello, Does anyone have a formula for calculating the number of days a stock was owned? Of course its real easy if you buy 100 shares on April 1 and sell 100 shares on July 1 but what about...
24
6105
by: rudranee | last post by:
hi there, can anyone tell me how to lines from a file which are odd numbered i.e. 1st,3rd,5th...lines. i tried incrementing file pointer by 2 (fp=fp+2) but it does'nt work Can someone give me...
0
1593
by: peridian | last post by:
Hi, I have the below code to transfer code modules between Access database files. I have three problems, only one of which is annoying. a) How do you prevent the Save As box from appearing...
9
2954
by: joba | last post by:
Hi, I am building a program to calculate vacations for employees. Can anyone show me how to write a VBA code to differentiate even-numbered (Eg 2005) years from odd - numbered(Eg.2006) years. ...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7060
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6760
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7022
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3004
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.