C#和VB.NET之间最重要的功能区别是什么?
问题描述:
当然,一般语法有区别,但是还有什么其他关键区别?
Certainly there's the difference in general syntax, but what other critical distinctions exist? There are some differences, right?
答
链接的比较是非常彻底的,主要差异我会注意到以下:
The linked comparisons are very thorough, but as far as the main differences I would note the following:
-
C#有匿名方法li>
-
C#有yield关键字(迭代器块)VB11添加了这个 - VB支持隐式后期绑定(C#现在通过动态关键字显式后期绑定)
- VB支持XML文字
- VB不区分大小写
- 更多开箱即用的代码VB
-
更多开箱即用的重构工具C#Visual Studio 2015现在为VB和C#提供了相同的重构工具。 li>
-
C# has anonymous methodsVB has these now, too -
C# has the yield keyword (iterator blocks)VB11 added this - VB supports implicit late binding (C# has explicit late binding now via the dynamic keyword)
- VB supports XML literals
- VB is case insensitive
- More out-of-the-box code snippets for VB
-
More out-of-the-box refactoring tools for C#Visual Studio 2015 now provides the same refactoring tools for both VB and C#.
一般来说,MS关注的东西各不相同,因为这两种语言都针对非常不同的受众。 本博文对目标受众有一个很好的总结。确定您所在的受众群体是一个好主意,因为它会决定您从Microsoft获得什么样的工具。
In general the things MS focuses on for each vary, because the two languages are targeted at very different audiences. This blog post has a good summary of the target audiences. It is probably a good idea to determine which audience you are in, because it will determine what kind of tools you'll get from Microsoft.