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

VB .NET vs. C#

作者:闵涛 文章来源:闵涛的学习笔记 点击数:2333 更新时间:2009/4/23 16:37:58

VB .NET vs. C#

选择那个会更好一点?

 

By Montaque(当然,我只是做了稍微的注解)

 

偶尔看到的这片文章,我觉得还是不错的一片文章。作者分析了一下两者相比较都是那个更适合我们,尤其对于那些正在C#VB.NET之间犹豫的程序员。

 

With the release of .NET, Microsoft is creating two new languages, Visual Basic .NET and C#. Many developers are wondering which language they should choose, and current Visual Basic developers often say they’re thinking about moving to C#. Does it really matter if you build your applications with VB .NET or C#? How do you choose between the two languages?

 

Why Do They Exist?

为什么两者共存?

 

Before diving into their similarities and differences, it helps to understand why both languages exist and how they compare with their predecessors.

 

I often have the chance to ask people why Visual Basic exists. Microsoft’s co-founder and chairman Bill Gates has a long history with the BASIC language. In fact, his first product was a BASIC interpreter for the Altair computer, written on punch tape. Microsoft’s history with BASIC includes several versions of BASIC before Visual Basic, but Visual Basic was Microsoft’s first real attempt to open Windows programming to the masses.

 

I have to admit that I scoffed when I first saw Visual Basic 1.0. I knew that real Windows programs were written in C++, not Visual Basic. Fortunately, however, I hadn’t been too brainwashed by the C++ crowd, and, as I learned Visual Basic, I began to see a simple elegance in it. True, version 1.0 didn’t exactly let you write mission-critical applications, but it was very easy to create a quick Windows application.

 

真正的程序员都是用C++,但是vb却以其简单易用开发程序吸引了我。

 

As Visual Basic evolved, it became much more powerful. Today, it is the most common way to build business applications on the Windows platform quickly. VB applications can be distributed, scalable, fast, and even mission-critical. Meanwhile, the C++ developers continue to regard VB as a toy language. After all, you can’t really program without pointers (and pointers to pointers), can you?

  时至今日,vb可以轻松开发商业、甚至要求苛刻的程序。

While VB has gained a huge, worldwide following, the language (pre .NET) does have some missing elements. I rarely hear VB developers asking for pointers like those in C++, but they do ask for implementation inheritance, multithreading, and the ability to create Windows services and console applications natively. VB .NET answers all these requests and fixes many of the annoying little issues with VB. For example, you can instantiate variables at run time now, and parameter passing defaults to ByVal.

       指针很重要吗?我们需要的是继承、多线程。。。

 

VB .NET is the modernization of VB, having added implementation inheritance and multithreading, but VB .NET has done so not so much through language changes as by supporting the features built into the .NET Framework. The Framework’s Common Language Runtime, or CLR, provides inheritance and multithreading along with support for a variety of projects. VB .NET is one of the first-class languages on the .NET platform, meaning it fully supports the CLR and cannot be considered a second-class citizen to C#.

  .NET这一平台下,vb.net绝对不落后c#

 

拿为什么会有c#呢?

C# exists for a very different reason. While VB .NET added support for such things as multithreading and inheritance, C++ has had those capabilities for years. However, C++ often is used for plumbing. You don’t typically write device drivers in VB. Instead, you use C++. If you take the concept of building a house, the C++ developers are the ones pouring the foundation, running the wiring, and installing the plumbing. VB developers then step in, put up the drywall, add carpeting, paint and furniture, and make the rooms functional. It’s not that C++ can’t do those things, it’s just that it generally takes longer to do those things in C++. In business, time is money, and time is a luxury many businesses do not have.

  还是承认,C++是基础,vb开发应用层。商业上,时间就是金钱;同样开发效率就是金钱。

Microsoft claims C# is the modernization of C++, just as VB .NET is the modernization of VB. While C# does try to eliminate some of the inconsistencies of the C++ language, it is really more about welcoming C++ developers into the world of building business applications quickly. In other words, C# allows C/C++ developers to finish those rooms and make them functional as fast as VB developers have been able to for years.

  C#对C++的用户来说,却是一个快速开发的好工具。

C# eliminates many of the areas that make C++ a minefield for developers. Because C# is built on the .NET Framework, it takes advantage of .NET’s automatic memory management. This should eliminate many of the memory leaks often associated with incorrect use of memory in C++. C# also takes advantage of the CLR’s type safety, preventing you from reading memory outside your object’s memory range. And C# eliminates explicit pointers, which were the source of a tremendous number of bugs, especially for novice developers.

 

Some C++ developers see C# as the “dumbing down” of C++. Instead, it is an attempt to build a type-safe, reliable .NET language with syntax familiar to C++ developers. Similarly, VB .NET is an attempt to build a type-safe, reliable .NET language with syntax familiar to VB developers. The fact that VB .NET seems to gain a host of features is due more to its support of the CLR than to enhancements of the language. Because C++ already supported many of these features, some developers say the move to C# seems like a step backward.

  C++用户使用C#是不是一个倒退?

VB .NET or C#: Does It Matter?

选择VB .NET or C#,很重要吗?

ASP classic developers have been debating VBScript vs. JScript on the server for about four years. The syntax of the two was obviously quite different, but, beyond that, the differences were minor. VBScript added a few nice objects, such as the Dictionary, the FileSystemObject, and the TextStream objects. But, overall, the languages let you accomplish the

[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……
    咸宁网络警察报警平台