Programmer pain: Do you want to learn C # Or VB. NET?

Source: Internet
Author: User
In the past year, the discussion list of various discussion forums or emails on the Internet has been VB. NET And C # To explore the advantages. The main problems that these discussions focus on are: Which one should I learn first, VB. NET Or C # ?

I forward this articleArticleThe purpose is to help you solve this problem. I don't want to shake your preferred language, but want to solve some of your doubts on the basic issues so that you can make your own decisions, select a language that you feel is the most comfortable to use. I will try to avoid some syntactic ambiguity, just like"C #Too many arc types,"" VB. NETThe sentence is too long,"Or"I hateC #(OrVB. NET) Because it can (or cannot) be case sensitive."And so on. The quality of comment syntax is a matter of your personal taste. Instead, I will focus on some of the technical aspects of the two languages I have seen.

InC #Aspect

As Microsoft's latest languageJavaA small version of the language,C #It attracted a lot of attention.

People seem to like a language only because it is the latest,ProgramDevelopers always like to work with the latest tools. Other optionsC #The reason is more specific.

What leads the trend is always impeccable.

"If I am preparing to learn a new language, I should still learnC #."This may also be what you often hear. The reasoning is always like this:"VB6TransitionVB. NETThe change is so big that it is basically a new language. If I plan to learn a new languageC #Because it is especially. NetClass Library Design."

This is also the palest debate I have heard about these two aspects. You can also say with confidence that if I plan to learn a new language,I want to learnVB. NETAfter all, it is also a new language. In addition, let's think about whyVB. NETIt evolved from its pioneers so fiercely to the present: to adapt. NetClass Library is re-designed.

Compared and not managedCode

"C #Allow me to writeCLSNon-Management Code beyond memory control, I can directly access the memory and use pointers. This allows code to run freely, including memory management, to achieve higher benefits."This view has3First, we should notBetaPerformance issues are discussed in the development environment of the version. For example. NetOfBeta1AndBeta2There is a significant improvement in the speed of managing code between versions. Second, we cannot quantify how much benefits non-management code can get than Management Code, and whether it is worth taking risks for these benefits. You can check it out.Eric GunnersonInMsdnThis article. Third, althoughVB. NETYou cannot create non-Management Code.System. runtime. interopservicesNamespace is used to access and work in non-managed storage.

C #Built-inXMLFile Compiler

"C #Compilers include being directly embeddedSource codeOfXMLFile editor. If I useC #At the same time, I wrote the code and compiled the file."UsedJavadocEveryone knows how useful it is to add your file preparation to your source code. Source code and file preparation can be updated at the same time, so at least theoretically, your documents will never expire. However, in my experienceJavaDevelopers are still usingJavadoc. In this way, the problem becomes"Will you use it?"If your answer to this question is"Yes"You have enough reason to try.C #.

AboutVB. NETWhat about it?

In the eyes of many real developers,VBFrom a certain point of view, it does look like a toy language. So far,VBFar more than the two or three vulnerabilities we know. HoweverVB. NETAnd indeedC #Equally powerful. NetDevelopment language. Some people say it is more powerful.

VB. NETBuilt-in (insert features) support;C #No.

"VB. NETMany built-in operations such as string operations(MID, instr,And so on.)And type conversion (for exampleCINT).C #Lack of these built-in support, so what I need isC #Is hard to find.

If you catch this, you shouldMidOrCINTThe function is not available, and eventually this isVB. NETBetterC #You 'd better check the evidence.Microsoft. VisualBasic namespace. You will find mostVB. NETInternal commands and application functions. These functions are available inNamespaceAfter being saved, anyCLSCompatible languages can all use them, just like the listAAs shown in. These examples weaken our debate, right?

Better bundled support is not supported

"VB. NETAndComEntity bundling supports better."I just saw a little bit, and I decided not to make any reasoning in support. From what I have observed so far, this is not true.C #AndVB. NETRequiredRuntime callableTo execute an early entity. Similarly, executing a late entity requires the same amount of code.

VB. NETUseIDEBackground compilation in

If you cannot find other ideasVBFor example, you must at least acknowledge that its source code editing is very characteristic. You can literally eliminate errors in your code while typing. The trouble is that the boxes of compilation errors that are very mentally retarded are always popped up. If you make your horn sound too loud, it may scare you to report an error.

Visual Studio. NETThis alarm is avoided until the modification is complete and some negative errors are handled, prompting that the system has been improved by Microsoft: it will underline the wrong statements.

VB. NETBackground Compilation Program/The syntax tester is very complex and politely points out your errors. In some ways, it can tell you more accurately how to modify errors in your source code. WhenC #Has its own syntax checker, and can find out the matching of the arc, calculate the number of the arc circle, and display the lost semicolon, but it still cannot be likeVB. NETIt is easy to use. Continuing to discuss the superiority of these two languages will indeed upset me, but Microsoft's words are indeed a truth, that is, all. NetAll languages are equal. Those ideasC #BetterVB. NETAnd vice versa.

I would like to emphasize that those far-sighted technology companies will no longer look for programmers with certain development language experience, but for those. NetA programmer with experience in class library development. Therefore, I advise you not to worry too much about what your choice is: simply find a language that you are interested in and learn its Framework Structure carefully. 

(This article is forwarded from other websites)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.