VB vs C# [英] VB vs C#

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

问题描述

我首先使用TurboC开始使用C语言,使用borland / ms扩展来升级到完整的C ++。在过去几年(干)年,我不需要做全口径项目。结果我切换到VB来制作那些快速的util prog。现在我已经回到完整(+1/2)时间编码,现在使用.NET,我想知道哪个方向更好。我意识到我可以使用任何一种语言创建不同的模块并将它们添加到最终项目中,但目前我是一个单人团队,所以所有代码都是我的。哪一个更适合速度?和大小?我已经注意到VB.NET通过自动完成/格式化比C#更多的代码输入,但是C#提供了对事件和接口的更多控制。有人提出任何想法或事实吗?我有兴趣听听其他人选择了哪一方及其原因。

I first started with the C language using TurboC moving up to the full C++ with both borland/ms extensions. For the last couple of (dry) years, I have not needed to do full bore projects. As a result I switched to VB to make those quick util progs. Now that I am back into full(+1/2)-time coding, and using .NET now, I was wondering which direction would be better to take. I realise that I can create different ''modules'' using either language and add them into a final project, but at the moment I am a one man team, so all the code will be mine. Which one is better for speed? and size? I''ve already noticed that VB.NET takes a lot of the drudgery out of code typing by auto-completing/formating a lot more than C# does, but C# provides a lot more control over events and interfaces. Does anyone have any thoughts or facts to put forward? I am interested in hearing what side other people have chosen and the reasons for it.

推荐答案

这些差异并不重要。在某些情况下,C#是*边缘*更快

,因为编译器会产生更高效的IL。它还有一些VB#缺少的功能,比如不安全的块等等。另一方面,正如你所指出的那样,VB#有一些更好的编码助手。


如果你正在写一般的商业应用程序它应该无论你觉得哪种语言都可以使用



-

____________________

Klaus H. Probst ,MVP
http://www.vbbox.com/

" Gary K" < __ ***** @ trcare.org.au __>在消息中写道

新闻:8D ********************************** @ microsof t.com ...
The differences are not relevant enough to matter. C# is *marginally* faster
in some instances because the compiler produces a bit more efficient IL. It
also has some features that VB# lacks, such as unsafe blocks and so on. On
the other hand, as you point out, VB# has some nicer coding aides.

If you''re writing the average business app it should come down to using
whatever language you feel comfortable with.
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/
"Gary K" <__*****@trcare.org.au__> wrote in message
news:8D**********************************@microsof t.com...
我首先使用TurboC开始使用C语言,使用borland / ms扩展来升级到完整的C ++
I first started with the C language using TurboC moving up to the full C++



。在过去几年(干)年,我不需要做b $ b来完成全部项目。结果我切换到VB来制作那些快速的工具编程。现在我已经回到了完整的(+1/2)时间编码,并且现在使用.NET进行
,我想知道哪个方向更好。我知道我可以使用任何一种语言创建不同的模块并将它们添加到最终项目中,但目前我是一个单人团队,所以所有的

代码都是我的。哪一个更适合速度?和大小?我已经注意到VB.NET在代码输入方面花费了大量的苦差事

自动完成/格式化比C#更多,但是C#为事件和接口提供了更多的控制权。有没有人有任何想法或提出b $ b b事实?我有兴趣听听其他人选择了什么方式

及其原因。


with both borland/ms extensions. For the last couple of (dry) years, I have
not needed to do full bore projects. As a result I switched to VB to make
those quick util progs. Now that I am back into full(+1/2)-time coding, and
using .NET now, I was wondering which direction would be better to take. I
realise that I can create different ''modules'' using either language and add
them into a final project, but at the moment I am a one man team, so all the
code will be mine. Which one is better for speed? and size? I''ve already
noticed that VB.NET takes a lot of the drudgery out of code typing by
auto-completing/formating a lot more than C# does, but C# provides a lot
more control over events and interfaces. Does anyone have any thoughts or
facts to put forward? I am interested in hearing what side other people have
chosen and the reasons for it.


这些差异不足以解决问题。在某些情况下,C#是*边缘*更快

,因为编译器会产生更高效的IL。它还有一些VB#缺少的功能,比如不安全的块等等。另一方面,正如你所指出的那样,VB#有一些更好的编码助手。


如果你正在写一般的商业应用程序它应该无论你觉得哪种语言都可以使用



-

____________________

Klaus H. Probst ,MVP
http://www.vbbox.com/

" Gary K" < __ ***** @ trcare.org.au __>在消息中写道

新闻:8D ********************************** @ microsof t.com ...
The differences are not relevant enough to matter. C# is *marginally* faster
in some instances because the compiler produces a bit more efficient IL. It
also has some features that VB# lacks, such as unsafe blocks and so on. On
the other hand, as you point out, VB# has some nicer coding aides.

If you''re writing the average business app it should come down to using
whatever language you feel comfortable with.
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/
"Gary K" <__*****@trcare.org.au__> wrote in message
news:8D**********************************@microsof t.com...
我首先使用TurboC开始使用C语言,使用borland / ms扩展来升级到完整的C ++
I first started with the C language using TurboC moving up to the full C++



。在过去几年(干)年,我不需要做b $ b来完成全部项目。结果我切换到VB来制作那些快速的工具编程。现在我已经回到了完整的(+1/2)时间编码,并且现在使用.NET进行
,我想知道哪个方向更好。我知道我可以使用任何一种语言创建不同的模块并将它们添加到最终项目中,但目前我是一个单人团队,所以所有的

代码都是我的。哪一个更适合速度?和大小?我已经注意到VB.NET在代码输入方面花费了大量的苦差事

自动完成/格式化比C#更多,但是C#为事件和接口提供了更多的控制权。有没有人有任何想法或提出b $ b b事实?我有兴趣听听别人有什么方面选择
及其原因。


with both borland/ms extensions. For the last couple of (dry) years, I have
not needed to do full bore projects. As a result I switched to VB to make
those quick util progs. Now that I am back into full(+1/2)-time coding, and
using .NET now, I was wondering which direction would be better to take. I
realise that I can create different ''modules'' using either language and add
them into a final project, but at the moment I am a one man team, so all the
code will be mine. Which one is better for speed? and size? I''ve already
noticed that VB.NET takes a lot of the drudgery out of code typing by
auto-completing/formating a lot more than C# does, but C# provides a lot
more control over events and interfaces. Does anyone have any thoughts or
facts to put forward? I am interested in hearing what side other people have
chosen and the reasons for it.


嗨Klaus,

这里新增了吗?
Hi Klaus,

New here?
这些差异不够重要。在某些情况下,C#是*边缘*
更快,因为编译器会产生更高效的IL。
The differences are not relevant enough to matter. C# is *marginally* faster in some instances because the compiler produces a bit more efficient IL.




有些情况下,VB是*边缘*更快,因为它可以使用

Microsoft.Visual基本命名空间,其中包含一些比单个Net命名空间具有更多性能的函数。


然而,dotnet新闻组中的大多数常客语言.vb和

languages.csharp只表示您选择哪种语言

,这两种语言都有(对于带有选项严格的vb当然)

相同的性能。


Cor



There are situations where VB is *marginally* faster because it can use the
Microsoft.Visual basic namespace which contents a few functions which have
more performance than the single Net namespace.

However the most regulars in the dotnet newsgroups languages.vb and
languages.csharp say only that it is a matter of preference which language
you choose, both languages have (for vb with option strict on of course) the
same performance.

Cor

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

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