什么是C#和VB.NET之间最重要的功能上的区别? [英] What are the most important functional differences between C# and 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#有匿名方法击> VB现在拥有这些,太
- <击> C#有yield关键字(迭代器块)击>添加VB11本
- VB支持隐含后期绑定(C#有明确现在后期通过动态绑定关键字)
- VB支持XML文本
- VB不区分大小写
- 更外的开箱code段为VB
- <击>更多外的现成重构工具为C#罢工>的Visual Studio 2015年,现在提供了相同的重构工具为VB和C#。
C# has anonymous methodsVB has these now, tooC# 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专注于每一个变化,因为这两种语言是针对完全不同的受众。 <一href=\"http://blogs.msdn.com/ericlippert/archive/2004/03/02/cargo-cultists-part-three-is-mort-a-cargo-cultist.aspx\">This博客文章有目标受众的一个很好的总结。这可能是一个好主意,决定你是哪个观众,因为这将决定什么样的工具,你会得到微软的。
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.
这篇关于什么是C#和VB.NET之间最重要的功能上的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!