本文介绍了C#还是VB.NET?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我是.NET的初学者。我之前一直使用普通的asp进行编码,使用 VBScript,现在当我迁移到.NET时,我显然选择了VB.NET。 但是....当我在网上看到代码示例时,它们大部分都在C#中,我在这个新闻组中看到了一个 的帖子,有人提到它是一个非常加热的/ > 回顾2002年的主题关于VB.NET与C#" ;. 所以,我的问题是......那个话题的结果是什么? 什么是最好的,VB.NET或C#?为什么? 感谢和问候 解决方案 显然???你已经清楚地陷入了VB.NET以某种方式升级Visual Basic并且ASP.NET在某种程度上是ASP升级的陷阱 Classic。除了一些外围的句法相似之外,没有什么比事实更进一步。原因当然是.NET Framework ... 既然你熟悉ASP Classic,你无疑会享受到舒适感 昏暗的因素这就是那样,如果...然后......否则...结束如果等...但是,因为 你熟悉ASP Classic,你差不多肯定有一些曝光 到JavaScript,所以基本的C#语法已经完全可以理解了 你... 那是我...... 没有结果,因为没有正确或错误的答案......两个 语言(几乎)相同功能 - C#对VB.NET的唯一主要优势是支持不安全的代码即指针。 两种语言(几乎)相同的原因是因为它们 针对.NET Framework。在最简单的层面上,它实际上并不是你所使用的.NET语言 - 它们都是相同的...... 两者,然后决定你喜欢哪个。 我个人认为VB.NET是一个完全不必要的语言,并且它纯粹出于营销原因而存在。早在2002年初,在微软和一个微小的beta测试社区之外,没有C#程序员在 全部。但是有数以百万计的VB程序员,并且微软 并不是要通过发布一个没有 基本风味的新开发套件来疏远它们...... 在.NET之前,我几乎完全靠着基本的各种 方言生活,直到QuickBasic和通过VB对于DOS, VB用于Windows,VBScript,AccessBasic,WordBasic,VBA等。 但是,在用C#约一天后,我知道我从来没有想再写一下另一张 系列的Basic!而且,除了2004年的一件作品,我只是简单地说b $ b不能拒绝,我从来没有...... 但是,那个'只是我的意见...... - Mark Rae ASP.NET MVP http://www.markrae.net 我不同意你的意见。虽然我喜欢C#,但这只是因为它带来了你可能会感觉到你的感觉(因为 模糊的感觉)当你认为它以某种方式与某些 方式的C ++相关时会得到 - 当它真的不是这样的时候。除了C#的指针和基本的 非托管代码能力(在大多数业务解决方案中无用),VB比C#做得更多 。 VB事件接线更好(故障),intellisense +语法 检查要好得多(在键入时进行后台编译),内置 函数包含大量代码(例如,Asc,Left,Mid等... ,可以优雅地处理异常)在VisualBasic库命名空间中, 和方便的我的命令。命名空间。再加上VB2008的高级LINQ / XML 实现,你有一个明显的优势。 现在,非常欢迎你更喜欢C#语法。但就 功能而言,VB并不是相同的。到C#......它更好。 C. Moya http://www.cmoya.com Mark Rae [MVP]" < ma ** @ markNOSPAMrae.netwrote in message news:%2 **************** @ TK2MSFTNGP03.phx.gbl ... 显然???你已经清楚地陷入了VB.NET以某种方式升级Visual Basic并且ASP.NET在某种程度上是ASP升级的陷阱 Classic。除了一些外围的句法相似之外,没有什么能比实际更进一步。原因当然是.NET Framework ... 既然你熟悉ASP Classic,你无疑会享受到舒适感 昏暗的因素这就是那样,如果...然后......否则...结束如果等...但是,因为 你熟悉ASP Classic,你差不多肯定有一些 暴露在JavaScript中,所以基本的C#语法已经完全可以理解为你了... 那是我...... 没有结果,因为没有正确或错误的答案......两个 语言(几乎)相同功能 - C#在VB.NET上唯一的主要优势是支持不安全的代码,即指针。两种语言(几乎)相同的原因是因为它们都是.NET Framework的目标。在最简单的层面上,它根本不重要你用的是什么.NET语言 - 它们都是 相同...... >什么是最好的,VB.NET或C#?为什么? 两者,然后决定你喜欢哪个。 我个人认为VB.NET是一个完全不必要的语言, ,纯粹出于营销原因而存在。早在2002年初,在微软和一个微小的beta测试社区之外,没有C#程序员 。但是有数以百万计的VB程序员,并且微软并不打算通过发布一个没有基本风格的新开发套件来疏远它们。 在.NET之前,我几乎完全靠着基本的各种 方言生活,直到QuickBasic和通过VB for DOS,VB for Windows,VBScript,AccessBasic,WordBasic,VBA等。 但是,在用C#约一天后,我知道我从来没有想再写一下另一行Basic的 !而且,除了2004年的一件作品 ,我根本无法拒绝,我从来没有... 但是,那个'只是我的意见...... - Mark Rae ASP.NET MVP http://www.markrae.net Hi,I am a beginner in .NET. I have been coding in plain asp before, usingVBScript, and now when i''m migrating to .NET, i obviously chosed VB.NET.But.... when i see code samples on net, they are mostly in C#, i also saw apost in this newsgroup where someone mentioned that it was a very "heatedtopic back in 2002 about VB.NET vs C#".So, my question is... what was the result of that topic?What is best to go for, VB.NET or C#? and why?Thanks and regards 解决方案Obviously??? You''ve clearly fallen into the trap that VB.NET is somehow anupgrade of Visual Basic and that ASP.NET is somehow an upgrade of ASPClassic. Apart from some peripheral syntactic similarities, nothing could befurther from the truth. The reason, of course, is the .NET Framework...Since you''re familiar with ASP Classic, you no doubt enjoy the comfortfactor of Dim This As That, If...Then...Else...End If etc... But, sinceyou''re familiar with ASP Classic, you''ve almost certainly had some exposureto JavaScript, so basic C# syntax will already be totally understandable toyou...That was me...There was no result, because there is no right or wrong answer... Bothlanguages are (almost) identical in terms of functionality - the only mainadvantage that C# had over VB.NET was support for unsafe code i.e. pointers.The reason that both languages are (almost) identical is because they bothtarget the .NET Framework. At it most simplistic level, it really doesn''tmatter at all what .NET language you use - they are all identical...Both, and then decide which you prefer.It''s my personal opinion that VB.NET is a totally unnecessary language, andit exists purely for reasons of marketing. Back in early 2002, outside ofMicrosoft and a tiny beta test community, there were no C# programmers atall. But there were millions and millions of VB programmers, and Microsoftweren''t about to alienate them by releasing a new development suite with noflavour of Basic...Prior to .NET, I''d made my living almost exclusively with the variousdialects of Basic right back as far as QuickBasic and on through VB for DOS,VB for Windows, VBScript, AccessBasic, WordBasic, VBA etc.But, after about a day with C#, I knew that I never wanted to write anotherline of Basic again! And, apart from one piece of work in 2004 that I simplycouldn''t turn down, I never have...However, that''s just my opinion...--Mark RaeASP.NET MVP http://www.markrae.netObviously??? You''ve clearly fallen into the trap that VB.NET is somehow anupgrade of Visual Basic and that ASP.NET is somehow an upgrade of ASPClassic. Apart from some peripheral syntactic similarities, nothing couldbe further from the truth. The reason, of course, is the .NET Framework...Since you''re familiar with ASP Classic, you no doubt enjoy the comfortfactor of Dim This As That, If...Then...Else...End If etc... But, sinceyou''re familiar with ASP Classic, you''ve almost certainly had someexposure to JavaScript, so basic C# syntax will already be totallyunderstandable to you...That was me...There was no result, because there is no right or wrong answer... Bothlanguages are (almost) identical in terms of functionality - the only mainadvantage that C# had over VB.NET was support for unsafe code i.e.pointers. The reason that both languages are (almost) identical is becausethey both target the .NET Framework. At it most simplistic level, itreally doesn''t matter at all what .NET language you use - they are allidentical...Both, and then decide which you prefer.It''s my personal opinion that VB.NET is a totally unnecessary language,and it exists purely for reasons of marketing. Back in early 2002, outsideof Microsoft and a tiny beta test community, there were no C# programmersat all. But there were millions and millions of VB programmers, andMicrosoft weren''t about to alienate them by releasing a new developmentsuite with no flavour of Basic...Prior to .NET, I''d made my living almost exclusively with the variousdialects of Basic right back as far as QuickBasic and on through VB forDOS, VB for Windows, VBScript, AccessBasic, WordBasic, VBA etc.But, after about a day with C#, I knew that I never wanted to writeanother line of Basic again! And, apart from one piece of work in 2004that I simply couldn''t turn down, I never have...However, that''s just my opinion...--Mark RaeASP.NET MVP http://www.markrae.net 这篇关于C#还是VB.NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-04 14:26