转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 软件开发 >> VB.NET程序 >> 正文
VB .NET vs. C#         ★★★★

VB .NET vs. C#

作者:闵涛 文章来源:闵涛的学习笔记 点击数:2352 更新时间:2009/4/23 16:37:58
> in C# instead of VB .NET.

 

One of the differences when working with both languages in Visual Studio .NET is important to point out. When writing VB .NET, you can type “console” and when you press the period, the list of properties and methods appears. If you are typing in C# and you type “console” and press the period, nothing appears. This is because C# is case sensitive, and you’ll have to type “Console” for the IntelliSense to work. VB .NET developers may find this tedious. Whether you consider it lazy or convenient, VB .NET developers typically type everything in lowercase and let the environment case it properly. C# developers have to case it properly as they type. This means C# forces a stricter set of code-writing standards, while VB .NET developers save wear and tear on the shift key.

  VB.NET省了很多press SHIFT的机会,不行吗:)

So, how do you choose? If the functionality in the two languages is nearly the same, how do you go about choosing which language you want to use? I’ll break this discussion into three categories: familiarity, resources and support, and personal edification.

 

Familiarity

The main reason to choose VB .NET or C# is familiarity, which is interesting because both languages are new. I’ve had some people on the Microsoft project team tell me they don’t want the move from VB to VB .NET to sound like a big move. Well, it is a big move. The learning curve is steep. The learning curve from VB to C# is steep. The learning curve from C++ to C# is steep.

 

You’re learning a new language, but much of it is learning the .NET Framework and all the classes the CLR supplies. If you want to create a new thread, it’s in the run time. If you want to access data using ADO.NET, it’s in the run time. If you want to read in some XML, it’s in the run time. I think you get the picture: Much of what you will be doing is learning the run time.

 

As you learn the run time, however, you’ll be using some language to play with it. While VB .NET is a new language, and there are differences from VB that will cause you to lose your hair, I think it’s safe to say that the learning curve going from VB to VB .NET is less steep than it is from VB to C#. C++ developers will feel more at home with C# than with VB. If you are a hard-core Java or JScript developer, you also will feel much more at home with C#.

       那个更熟悉?一言道破,C++用户到C#以及vbvb.net是个不错的选择。

 

VB developers will be much more at ease with VB .NET’s loops, conditional constructs, variable declaration syntax, and more. Why fight case sensitivity and that double-equals sign when you don’t have to? You’ll find yourself searching for a bug for an hour, and it will turn out to be a missing equals sign. You don’t need the headache of learning the nuances of a new language when you are trying to learn the CLR.

 

C++, Java, and JScript developers are used to case sensitivity, the double-equals, and all those curly braces. Moving to the more wordy VB .NET syntax would probably just be frustrating at a time when the developer should be focused on learning the CLR classes and not having to worry about an unfamiliar syntax.

 

Recommendation No. 1: Go with what’s closest to you. If you are a new developer and have never written a line of code in your life, you’ll have to find your answer in the next two sections.

  总结一下吧,选择最亲切的一种语言吧。如果呢是一个新手,还是看看后面的分析吧:)

Resources and Support

参考资源的盈亏

If you are learning a new language, what’s the first thing you do? For most people, the first step is to create a Hello World program from a book or a help file. Some people actually read the language reference then. (Really, I’ve seen people do it!) Most people go through online tutorials, maybe buy a book or two, and then look at the language reference only when they are stuck.

 

There will be no shortage of books, Web sites, and articles on either VB .NET or C#. So you should have plenty of opportunities to read about either language and have a number of examples from each language.

 

However, there are other factors to consider. Do you know anyone with experience in either one? Someone you can bounce ideas off of when you are having problems? What about industry support? Microsoft created both languages, but how many VB .NET developers will there be, compared with C# developers? Will Microsoft favor one over another in example code? Will your area offer training in both VB .NET and C#?

 

Most resources should be widely available in each language, but, if VB is any guide, there will be more VB .NET developers than there will be C# developers. While I expect the gap between the number of VB .NET and C# developers to be smaller than the gap between VB and C++ developers, there will likely be more VB .NET developers because so many VB developers will use VB .NET when they make the leap to .NET.

  说了这么多,好像再说.NET开发者更多,当然可以请教的高手也多。

Personal Edification

个人领悟

Perhaps you’ve always wanted to program in C++ but found it too obscure, difficult, or overwhelming. Now, you see that C# exists but removes some of the more intensive tasks, such as managing memory and handling pointers. If it’s been a lifelong dream of yours to program in C or C++, feel free to take C# for a spin. You’ll find it quite forgiving and very powerful for creating business applications.

 

If you’re thinking, “Aha! Now I can learn C# and pull down the big bucks!” then I need to warn you about something. You see, it’s true in most cases today that C++ developers earn more than do VB developers. One reason is that there are a lot fewer C++ developers. Another reason, though, is the kind of work that C++ developers are doing. They are typically doing things you can’t do (at least not reasonably) in VB. They’re writing device drivers, socket interfaces, or any manner of low-level applications. VB developers, on the other hand, are busy solving business problems.

 

C# is not going to be used for the same purposes as C++. Instead, C# will be used for business applications. Therefore, C# and VB .NET will be used to create exactly the same kinds of applications. The advantage of one over the other will be miniscule when creating business applications. The only way you might earn more as a C# developer is that there likely will be fewer of them, so you may get lucky that way. It’s unlikely, however, that you’ll be building low-level applications. So, unless the manager is a dolt, you won’t be worth more than a VB .NET developer.

 

上一页  [1] [2] [3] [4]  下一页


[VB.NET程序]GSM短信模块库函数,可以用VB,VC,调用简单实用  [C语言系列][C#防止反编译].NET 产品版权保护方案 (.NET源码加…
[互联动态].NETFramework3.0新特性介绍与问答翻译  [Web开发]asp.net代码空格显示为……点号的原因及解决办法
[Web开发]asp.net调用压缩软件对文件进行压缩与解压缩的代码  [Web开发]详细介绍asp.net获取日期时间的各种格式的函数
[Web开发]如何将JS文件编译到ASP.NET项目里的DLL文件中  [Web开发]asp.net加密口令的最简单方法
[Web开发]目前asp.net开发主流工具软件介绍  [Web开发]asp.net中的反射介绍
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · C语言系列  · VB.NET程序
    · JAVA开发  · Delphi程序
    · 脚本语言
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台