I wrote this article 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 talking about some syntactic ambiguity, just like "C # has too many arc brackets," and "VB. net sentences are too long, "or" I hate C # (or VB. 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.
C #
As Microsoft's latest language, C # has attracted a lot of attention because it is a small version of Java.
People seem to like a language only because it is the latest. program developers always like to work with the latest tools. The other reasons for using C # are more specific.
What leads the trend is always impeccable.
"If I am preparing to learn a new language, I should still learn C #." This may also be what you often hear. The reasoning is always like this: "VB6 has changed a lot to VB. NET, so that it is basically a new language. If I want to learn a new language anyway, I want to learn C #, because it is specially designed for. Net class libraries ."
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 anyway, I 'd like to learn VB. NET. After all, it is also a new language. In addition, let's think about why VB. NET evolved from its pioneers so fiercely to the present: It was redesigned to adapt to the. NET class library.
Compare managed and unmanaged code
"C # allows me to write non-administrative code that runs outside the control of CLS memory. I can directly access the memory and use pointers. This allows code to run freely, including memory management, to achieve higher benefits ." This viewpoint has three issues to consider: first, we should not discuss performance issues in the beta development environment. For example, there is a significant improvement in the speed of managing code between. Net's beta1 and beta2 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. Let's take a look at Eric Gunnerson's article on msdn. Third, although VB. NET cannot establish non-Management Code, it can access and work in non-management memory through the use of the system. runtime. interopservices namespace.
C # built-in XML file Compiler
"C # compilers include XML file compilers directly embedded into source code. If I use C #, I have also compiled the code and the file ." Anyone who has used javadoc knows how useful it is to add your file compilation 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 experience, a few Java developers are still using javadoc. In this way, the question becomes "will you use it ?" If your answer to this question is "yes", you have enough reason to try C #.
What about VB. NET?
In the eyes of many real developers, VB is like a toy language, and from a certain perspective, it is indeed like this. So far, VB is far more powerful than the two vulnerabilities we know. However, VB. NET is indeed the same powerful. NET development language as C. Some people say it is more powerful.
VB. NET has built-in support (insert feature), while C # does not
"VB. NET has many built-in features such as string operations (MID, instr, and so on) and type conversion (such as CINT ). C # lacks these built-in support, so what I need is hard to find in C.
If you hold on to these questions, you should leave the mid or CINT function unshelved, and finally think that this is evidence that VB. NET is better than C #, you 'd better check Microsoft. VisualBasic namespace. You will find most of the VB. NET Internal commands and application functions there. After these functions are saved in the namespace, any CLS-compatible language can use them, as shown in list. These examples weaken our debate, right?
Better bundled support is not supported
"VB. NET and COM Object bundling support 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 # and VB. NET must use runtime callable packaging and the same amount of source code to execute an early entity. Similarly, executing a late entity requires the same amount of code.
VB. NET uses background compilation in IDE
If you cannot find other examples that think the VB development environment is good, you must at least admit 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.. net avoids this shock until you finish the modification and handle some negative errors, prompting that the system has been improved by Microsoft: he will underline the wrong statements.
The VB. NET background Compiler/syntax validator 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. When C # has its own syntax checker, it can find out the matching of the arc, calculate the number of the arc, and display the missing semicolon, but it still cannot be like VB. net. Continuing to discuss the superiority of these two languages will indeed upset me, but Microsoft's words are indeed a truth, that is, all. NET languages are equally established. Those who advocate that C # Is Better Than VB. NET (and vice versa) are just as wrong as those who compare their salaries.
I want to emphasize that those far-sighted technology companies will no longer look for programmers with some development language experience, but those with. Net class library development experience. 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.
If you believe that I am wrong and the market does not require you to select a language, laugh at me!