模块和类 [英] Module and Class

查看:65
本文介绍了模块和类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!我无法理解VB.NET中的模块和类之间有什么区别

项目?

Hi! I can''t understand what difference between modules and classes in VB.NET
project?

推荐答案

Laserson。


模块是一个直接在程序堆栈上的程序。


对象是放在托管堆上的一个程序。 br />
(内存中的另一个地方,但使用起来更灵活)。


通过实例化一个类来创建一个对象。这意味着在程序上

堆栈是一个地址,告诉创建的对象在哪里。


如果你已经读过有关共享类的信息,那么几乎与

模块相同。对我来说,主要的区别在于,共享课程为您提供更多可靠的内容,以便更好地描述事物。


我希望这会有所帮助,


Cor
Laserson.

A module is a piece of program directly on the program stack.

An object is a piece of program placed on the managed heap.
(Another place in memory, however more flexible to use).

An object is made by instancing a Class. That means that on the program
stack is an address that tells where the created object is.

If you have read about a shared Class, than that is almost the same as a
Module. The main difference for me is, that a Shared Class gives you more
possibilitie to describe things more nice.

I hope this helps,

Cor


>嗨!我无法理解VB.NET中的模块和类之间有什么区别
>Hi! I can''t understand what difference between modules and classes in VB.NET
project?




一个模块基本上都是一个类所有成员是隐含的

共享,没有任何构造函数,所以你不能创建

的实例。

Mattias


-

Mattias Sj?gren [C#MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com

请回复到新闻组。



A module is basically a class where all the members are implicitly
Shared and without any constructor so you can''t create instances of
it.
Mattias

--
Mattias Sj?gren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


请参阅:


Visual Basic语言概念

类与模块
http: //msdn2.microsoft.com/en-us/lib...US,VS.80).aspx


-


祝你好运,


Carlos J. Quintero


MZ-Tools:Visual Studio 2005,Visual Studio的生产力插件.NET,

VB6,VB5和VBA

您可以在VB.NET,C#,C ++或VJ中更快地编码,设计和记录#

加载项开发人员的免费资源:
http://www.mztools.com

" Laserson" < LA ****** @ inbox.ru> escribióenel mensaje

news:%2 ****************** @ tk2msftngp13.phx.gbl ...
See:

Visual Basic Language Concepts
Classes vs. Modules
http://msdn2.microsoft.com/en-us/lib...US,VS.80).aspx

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio 2005, Visual Studio .NET,
VB6, VB5 and VBA
You can code, design and document much faster in VB.NET, C#, C++ or VJ#
Free resources for add-in developers:
http://www.mztools.com
"Laserson" <la******@inbox.ru> escribió en el mensaje
news:%2******************@tk2msftngp13.phx.gbl...
嗨!我无法理解VB.NET
项目中模块和类之间的区别是什么?
Hi! I can''t understand what difference between modules and classes in
VB.NET
project?



这篇关于模块和类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆