ASP.NET - C# 与 VB.NET - 间接差异以及您最初可能没有考虑到的事情
我对开始另一场“谁拥有更大的成员”VB 与 C# 辩论不感兴趣(https://stackoverflow.com/questions/158229/what-are-the-pros-of-vb-net 似乎已经涵盖了这一点)尽管我对可能影响开发的间接差异感兴趣与另一个。我所有的商业 .NET 开发都是用 VB 编写的桌面应用程序,直到最近 3 个月我有了一个 Web 项目,并认为这是一个强迫自己学习 C# 的好机会。在这样做的过程中,我注意到一些非技术差异:
C# 中提供的成熟开源应用程序和完整示例比 VB 中的多得多。
针对重构和文档之类的插件的第三方供应商往往比 VB 更好地支持 C#(如果有的话),而 VB 对类似 C# 版本的类似功能的支持往往落后或不存在。
针对 C# 的 ASP.NET 工作的平均薪资似乎比 VB 中的其他相同工作高出 15-20% 左右(至少在澳大利亚,请参考eek.com.au 和 Careerone.com.au)。< /p>
转向 ASP.NET、MVC 和 C# 立即带来了很多减速带,但我认为这是非常值得的。我现在需要做出的决定是,是投入更多的精力来追求 C# 以进行未来的 .NET 开发,还是还是坚持使用 VB。在这种情况下,人们应该考虑语言之间的任何其他差异点(除了已经涵盖的直接语言特征比较之外)吗?
I'm not interested in starting another "who has the bigger member" VB vs C# debate (https://stackoverflow.com/questions/158229/what-are-the-pros-of-vb-net seems to cover that already) though I am interested in indirect differences which may influence developing in one vs the other. All my commercial .NET development was desktop apps in VB until the last 3 months where I had a web project and decided it was a good opportunity to force myself to learn C#. In the course of doing so I've noticed a few non-technical differences:
A lot more mature open source apps and thorough examples are available in C# than for VB.
Third party vendors of add-ins for things like refactoring and documentation tend to support C# better than VB (if at all), with VB support for similar features from comparable C# versions often lagging behind or absent.
ASP.NET jobs targeting C# seem to pay around 15-20% more on average than otherwise identical jobs in VB (at least in Australia, looking on seek.com.au and careerone.com.au for reference).
The jump to ASP.NET, MVC and C# presented a lot of speed humps at once but I think was well worth it. The decision I need to make now is whether to put more energy into pursuing C# for future .NET development or if I might as well stick to VB. Are there any other points of difference between the language (other than direct language feature comparisons already covered) that one should consider in this instance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我发现 VS 对 VB 的自动代码补全功能比 C# 更多。
了解这两种语言非常有用,而且我个人必须更好地熟悉 C#,这样我才能轻松申请 C# 工作,这将使我的选择增加三倍。
I find that VS does more automatic code completion for VB than C#.
It's very useful to know both languages and I personally have to get better acquainted with C# so that I'm comfortable applying for C# jobs which should triple my options.
在 Microsoft 2009 Mix Web 上
开发者大会,所有
我参加的演讲
包含 C# 代码示例,而不是 VB。
在 StackOverflow 中,请注意如何
标记为 c# 的问题数量大大超过 vb.net 和
vb。
John Skeet 写的是C# 深度分析,而不是深度分析 VB< /em>.
At the Microsoft 2009 Mix Web
developer conference, all the
presentations that I attended
included code examples in C#, not VB.
In StackOverflow, notice how
questions tagged c# largely outnumber vb.net and
vb.
John Skeet wrote C# in Depth, not VB in Depth.
当我参与招聘(无论是作为招聘经理还是作为候选人)时,人们广泛提及的一件事是,C# 和 Java 非常接近,因此将候选人从一种转换为另一种相当容易,而且这对于 C# 或 Java 的 VB.NET 候选者来说,情况并非如此。这种说法甚至扩展到了 C++,称培训 C# 或 Java 开发人员(使用 C++ 编写代码)比培训 VB.NET 开发人员更容易。
尽管我倾向于不同意(我认为这更多的是关于人们如何看待编程),但我知道一些大型的、信誉良好的公司会接受列出 C++、C# 或 Java 经验的 C# 或 Java 职位的候选人。这些公司通常不会考虑只列出 VB.NET 或将 VB.NET 列为主要语言的候选人。
One thing that has been widely stated when I have participated in hiring (both as a hiring manager, as well as a candidate) is that C# and Java are close enough that converting a candidate from one to the other is fairly easy, and that this is not true for a VB.NET candidate to C#, or Java. This statement has even been extended to C++, saying training a C# or Java developer (to code in C++) is easier than a VB.NET developer.
Though I tend to disagree (I think it is more about how the person sees programming in general) I know that several large, reputable firms will accept candidates for C# or Java jobs that list C++, C# or Java experience. These same firms will in general not look at candidates who only list VB.NET, or list VB.NET as their primary language.
特别是对于 Web 开发来说,精通 C# 使得编写 javascript(以及使用 jQuery 做复杂的事情)变得更加容易,因为语法非常相似。
Specifically for web development, becoming proficient in C# made writing javascript (and doing complex things using jQuery) much easier because the syntax is so similar.
我同意你的观点,尤其是第一点。我想补充一点,似乎 C# 开发人员比 VB.NET 更多。如果您想雇用其他开发人员,您可能会从 C# 池中获得更多(数量或质量)。雇主认为 C# 更受欢迎,就会朝这个方向发展,对 C# 程序员的需求也会增加(因此您注意到的薪水/费率更高)
I agree with your points, particularly the first. I would add that it seems there are more C# developers out there than VB.NET. If you are looking to hire another developer, you may get more (quantity or quality) from the C# pool. And employers, perceiving that C# is more popular, will go in that direction, and there will be more demand for C# programmers (hence the higher salaries/rates you noticed)
我知道这是一篇旧文章,但我想添加另一个因素:所有新内容都首先在 C# 中完成。这来自我早期 WPF 开发的经验。 所有示例均使用 C# 编写,而我们则使用 VB.Net 编写。只是翻译需要额外的时间。另一个例子是 lambda,最初您可以在 C# 中使用表达式(单行)或语句(多行),但在 VB.Net 中只能使用表达式。
当 .Net 首次推出时,我认为有很多 VB6 人员并没有真正了解 .Net,而且它是一种完全不同的动物。我认为这些人对 VB.Net 的负面看法负有部分责任。但那已经是十年前的事了,现在已经不再是一个因素了。
I know that this is an old post but I'd like to add one other factor: all the new stuff gets done in C# first. This comes from my experiences with early WPF development. All the examples where in C# and we were working in VB.Net. It just took extra time to translate. Another example is lambdas, initially you could use expressions (single line) or statements (multi-line) in C# but only expressions in VB.Net.
When .Net was first rolled out, I think that there were a lot of VB6 folks who didn't really get .Net and that it was a whole different animal. I think that those people were partially responsible for the negative perceptions of VB.Net. But that was 10 years ago now and no longer a factor.