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

查看:396
本文介绍了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.

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

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