C# 和 VB.NET 之间最重要的功能区别是什么? [英] What are the most important functional differences between C# and VB.NET?

查看:18
本文介绍了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# 有匿名方法VB 现在也有这些了
  • C# 有 yield 关键字(迭代器块)VB11 添加了这个
  • VB 支持隐式后期绑定(C# 现在通过 dynamic 关键字具有显式的后期绑定)
  • VB 支持 XML 文字
  • VB 不区分大小写
  • 更多现成的 VB 代码片段
  • 更多现成的 C# 重构工具Visual Studio 2015 现在为 VB 和 C# 提供相同的重构工具.
  • 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.

这篇关于C# 和 VB.NET 之间最重要的功能区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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