ASP.NET - C#vs VB.NET - 间接差异和您最初可能不会考虑的事情

时间:2022-07-16 01:40:45

I'm not interested in starting another "who has the bigger member" VB vs C# debate (https://*.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:

我不想开始另一个“谁拥有更大的成员”VB vs C#辩论(https://*.com/questions/158229/what-are-the-pros-of-vb-net似乎已经覆盖了那个虽然我对可能影响一个人与另一个人的发展的间接差异感兴趣。我所有的商业.NET开发都是VB中的桌面应用程序,直到最近3个月我有一个Web项目,并认为这是一个强迫自己学习C#的好机会。在这样做的过程中,我注意到了一些非技术性差异:

  • A lot more mature open source apps and thorough examples are available in C# than for VB.

    C#中提供了比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.

    用于重构和文档之类的加载项的第三方供应商往往比VB支持C#(如果有的话),VB支持类似C#版本的类似功能,往往落后或缺席。

  • 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).

    针对C#的ASP.NET作业平均支付比VB中其他相同作业多15-20%(至少在澳大利亚,查看seek.com.au和careerone.com.au作为参考)。

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?

跳转到ASP.NET,MVC和C#同时提供了很多速度提升,但我认为非常值得。我现在需要做出的决定是,是否要为将来的.NET开发投入更多的精力去追求C#,或者我是否可以坚持使用VB。在这种情况下,应该考虑的语言(已经涵盖的直接语言特征比较除外)之间是否存在其他差异点?

6 个解决方案

#1


2  

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.

当我参与招聘(既作为招聘经理,也作为候选人)时,已经广泛陈述的一件事是,C#和Java足够接近,将候选人从一个转换为另一个是相当容易的,并且这个对于C#或Java的VB.NET候选者来说,情况并非如此。这个陈述甚至已扩展到C ++,称训练C#或Java开发人员(用C ++编写代码)比VB.NET开发人员更容易。

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.

虽然我倾向于不同意(我认为更多的是关于这个人如何看待编程)我知道几家知名的大型公司将接受C#或Java工作的候选人,这些工作列出了C ++,C#或Java经验。这些相同的公司通常不会考虑仅列出VB.NET或将VB.NET列为主要语言的候选人。

#2


4  

I find that VS does more automatic code completion for VB than C#.

我发现VS为VB做的自动代码完成比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.

了解这两种语言是非常有用的,我个人必须更好地了解C#,这样我才能轻松申请C#职位,这应该是我的选择的三倍。

#3


4  

  • At the Microsoft 2009 Mix Web developer conference, all the presentations that I attended included code examples in C#, not VB.

    在Microsoft 2009 Mix Web开发者大会上,我参加的所有演示都包含C#中的代码示例,而不是VB。

  • In *, notice how questions tagged c# largely outnumber vb.net and vb.

    在*中,请注意标记c#的问题如何大大超过vb.net和vb。

  • John Skeet wrote C# in Depth, not VB in Depth.

    John Skeet在深度编写了C#,而不是深度编写VB。

#4


2  

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.

特别是对于Web开发,变得精通C#使得编写javascript(以及使用jQuery执行复杂的事情)变得更加容易,因为语法非常相似。

#5


1  

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)

我同意你的观点,尤其是第一点。我想补充说,似乎有比VB.NET更多的C#开发人员。如果您想聘请其他开发人员,您可以从C#池中获得更多(数量或质量)。而且,认为C#更受欢迎的雇主将会朝这个方向发展,并且对C#程序员的需求会更多(因此你注意到更高的工资/费率)

#6


-1  

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.

我知道这是一个老帖子,但我想补充一个其他因素:所有新东西都是先用C#完成的。这来自我早期WPF开发的经验。所有的例子都在C#和我们在VB.Net中工作。翻译需要额外的时间。另一个例子是lambdas,最初你可以在C#中使用表达式(单行)或语句(多行),但只能在VB.Net中使用表达式。当.Net首次推出时,我认为有很多VB6人没有真正得到.Net而且它是一个完全不同的动物。我认为那些人对VB.Net的负面看法负有部分责任。但那是10年前的事情,而不再是一个因素。

#1


2  

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.

当我参与招聘(既作为招聘经理,也作为候选人)时,已经广泛陈述的一件事是,C#和Java足够接近,将候选人从一个转换为另一个是相当容易的,并且这个对于C#或Java的VB.NET候选者来说,情况并非如此。这个陈述甚至已扩展到C ++,称训练C#或Java开发人员(用C ++编写代码)比VB.NET开发人员更容易。

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.

虽然我倾向于不同意(我认为更多的是关于这个人如何看待编程)我知道几家知名的大型公司将接受C#或Java工作的候选人,这些工作列出了C ++,C#或Java经验。这些相同的公司通常不会考虑仅列出VB.NET或将VB.NET列为主要语言的候选人。

#2


4  

I find that VS does more automatic code completion for VB than C#.

我发现VS为VB做的自动代码完成比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.

了解这两种语言是非常有用的,我个人必须更好地了解C#,这样我才能轻松申请C#职位,这应该是我的选择的三倍。

#3


4  

  • At the Microsoft 2009 Mix Web developer conference, all the presentations that I attended included code examples in C#, not VB.

    在Microsoft 2009 Mix Web开发者大会上,我参加的所有演示都包含C#中的代码示例,而不是VB。

  • In *, notice how questions tagged c# largely outnumber vb.net and vb.

    在*中,请注意标记c#的问题如何大大超过vb.net和vb。

  • John Skeet wrote C# in Depth, not VB in Depth.

    John Skeet在深度编写了C#,而不是深度编写VB。

#4


2  

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.

特别是对于Web开发,变得精通C#使得编写javascript(以及使用jQuery执行复杂的事情)变得更加容易,因为语法非常相似。

#5


1  

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)

我同意你的观点,尤其是第一点。我想补充说,似乎有比VB.NET更多的C#开发人员。如果您想聘请其他开发人员,您可以从C#池中获得更多(数量或质量)。而且,认为C#更受欢迎的雇主将会朝这个方向发展,并且对C#程序员的需求会更多(因此你注意到更高的工资/费率)

#6


-1  

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.

我知道这是一个老帖子,但我想补充一个其他因素:所有新东西都是先用C#完成的。这来自我早期WPF开发的经验。所有的例子都在C#和我们在VB.Net中工作。翻译需要额外的时间。另一个例子是lambdas,最初你可以在C#中使用表达式(单行)或语句(多行),但只能在VB.Net中使用表达式。当.Net首次推出时,我认为有很多VB6人没有真正得到.Net而且它是一个完全不同的动物。我认为那些人对VB.Net的负面看法负有部分责任。但那是10年前的事情,而不再是一个因素。