VB.NET 和 VB 的区别

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23603569/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 17:32:45  来源:igfitidea点击:

Differences between VB.NET and VB

vb.netvisual-studio-2010visual-studio-2012

提问by Siddharth Kamaria

I have few questions in mind. I am new to this field of Visual Basic so don't make fun of me.

我有几个问题。我是 Visual Basic 这个领域的新手,所以不要取笑我。

1.) What are the differences between VB.NETand VB?
2.) I need to develop basic apps for Windows.(like a notepad) Which one should I use?
3.) Is there an IDE available for both?
4.) If possible can you suggest me a good resource for learning VB or VB.NET.

1.)VB.NET和之间有什么区别VB
2.) 我需要为 Windows 开发基本的应用程序。(如记事本)我应该使用哪个?
3.) 是否有适用于两者的 IDE?
4.) 如果可能的话,你能给我推荐一个学习 VB 或 VB.NET 的好资源吗?

Note:I know C and Java. I couldn't find a satisfactory answer anywhere.
Stackoverflow always provides the most precise answers.

注意:我知道 C 和 Java。我在任何地方都找不到满意的答案。
Stackoverflow 总是提供最准确的答案。

回答by Heinzi

1.) What are the differences between VB.NET and VB?

1.) VB.NET 和 VB 有什么区别?

VB.NET is a modern, object-oriented language. VB (Classic) is its predecessor, and it's no longer actively maintained.

VB.NET 是一种现代的、面向对象的语言。VB (Classic) 是它的前身,不再积极维护。

I don't know if that is what you are looking for, but a technical comparison can be found in Wikipedia:

我不知道这是否是您要查找的内容,但可以在维基百科中找到技术比较:

2.) I need to develop basic apps for Windows.(like a notepad) Which one should I use?

2.) 我需要为 Windows 开发基本的应用程序。(如记事本)我应该使用哪个?

VB.NET. However, if you already know Java, the C# syntax might be more familiar to you. From a functional point of view, VB.NET and C# are almost equivalent.

VB.NET。但是,如果您已经了解 Java,那么您可能更熟悉 C# 语法。从功能的角度来看,VB.NET 和 C# 几乎是等价的

3.) Is there an IDE available for both?

3.) 是否有适用于两者的 IDE?

VB.NET applications can be developed with Visual Studio, the most recent version is 2013.

VB.NET 应用程序可以用Visual Studio 开发,最新版本是2013。

The VB Classic IDE is unsupported as of April 8, 2008.

自 2008 年 4 月 8 日起,不再支持 VB Classic IDE。

4.) If possible can you suggest me a good resource for learning VB or VB.NET

4.) 如果可能的话,你能给我推荐一个学习 VB 或 VB.NET 的好资源吗?

This is off-topic for Stack Overflow.

这是 Stack Overflow 的题外话。

回答by MCHAppy

What is the difference between VB and VB.NET?

VB 和 VB.NET 有什么区别?

Now VB.NET is object-oriented language. The following are some of the differences:

现在VB.NET是面向对象的语言。以下是一些差异:

Data Type Changes

数据类型更改

The .NET platform provides Common Type System to all the supported languages. This means that all the languages must support the same data types as enforced by common language runtime. This eliminates data type incompatibilities between various languages. For example on the 32-bit Windows platform, the integer data type takes 4 bytes in languages like C++ whereas in VB it takes 2 bytes. Following are the main changes related to data types in VB.NET:

.NET 平台为所有支持的语言提供通用类型系统。这意味着所有语言都必须支持公共语言运行时强制执行的相同数据类型。这消除了各种语言之间的数据类型不兼容性。例如,在 32 位 Windows 平台上,整数数据类型在像 C++ 这样的语言中需要 4 个字节,而在 VB 中它需要 2 个字节。以下是 VB.NET 中与数据类型相关的主要变化:

. Under .NET the integer data type in VB.NET is also 4 bytes in size. . VB.NET has no currency data type. Instead it provides decimal as a replacement. . VB.NET introduces a new data type called Char. The char data type takes 2 bytes and can store Unicode characters. . VB.NET do not have Variant data type. To achieve a result similar to variant type you can use Object data type. (Since every thing in .NET including primitive data types is an object, a variable of object type can point to any data type). . In VB.NET there is no concept of fixed length strings. . In VB6 we used the Type keyword to declare our user-defined structures. VB.NET introduces the structure keyword for the same purpose. for more details you can refer http://dev.fyicenter.com/Interview-Questions/dotNet-1/What_is_the_difference_between_VB_and_VB_NET_.html

. 在 .NET 下,VB.NET 中的整数数据类型的大小也是 4 个字节。. VB.NET 没有货币数据类型。相反,它提供十进制作为替代。. VB.NET 引入了一种称为 Char 的新数据类型。char 数据类型占用 2 个字节,可以存储 Unicode 字符。. VB.NET 没有 Variant 数据类型。要获得类似于变体类型的结果,您可以使用 Object 数据类型。(由于 .NET 中包括原始数据类型在内的所有事物都是一个对象,因此对象类型的变量可以指向任何数据类型)。. 在 VB.NET 中没有固定长度字符串的概念。. 在 VB6 中,我们使用 Type 关键字来声明我们的用户定义结构。VB.NET 出于同样的目的引入了结构关键字。有关更多详细信息,您可以参考http://dev.fyicenter.com/Interview-Questions/dotNet-1/What_is_the_difference_between_VB_and_VB_NET_.html

and to develop windows apps , my best language is C# and you can choose VB.NET too

和开发windows应用程序,我最好的语言是C#,你也可以选择VB.NET

回答by shilpi verma

vb                                                vb.net
  1. it is interpreter based language. it is compiled language,use the cls.
  2. not a type safe language. it is a safe type language.
  3. backward compatible. not backward compatible.
  1. 它是基于解释器的语言。它是编译语言,使用cls。
  2. 不是类型安全的语言。它是一种安全的类型语言。
  3. 向下兼容。不向后兼容。