Million programmer's distress - choose VB.NET or C #

zhaozj2021-02-17  86

In the past year, the list of discussion on the Internet or email on the Internet has explored the various superiority of Microsoft VB.NET and C #. The main problem around these discussions is, which one should I learn first, VB.NET is also C #? The purpose of I wrote this article is to help you solve this problem. I don't want to shake you. Which language is to solve some of the doubts on the basic questions so that everyone can make their own decisions, choose a kind of language that I feel the most comfortable. I will try to avoid discussing the ambiguity of some grammar, just like "there is too much parentheses of C #," "VB.NET sentence is too long," or "I hate C # (or vb.net) because it can (or can't) Case sensitivity. " The commentary syntax is the problem of your personal taste. Instead, I will focus on discussing some discussions I have seen about the technical aspects of these two languages. As the latest language in Microsoft, since it is a small version of the Java language, C # has caused a lot of attention. People look like a language only depends on it. It is the latest, and the program developers always like to work with the latest tools. Some other reasons for choosing C # are more specific. "If I am going to learn a new language, I should also learn C #." This may be the speech you often hear. Those reasoning is always conducted: "VB6 transitions to VB.NET changes have been great, so that it is basically a new language. If I want to learn new languages, I think I still learn C #, Because it is a library of the .NET class. "This is also the pale argument that I have heard about these two aspects. You can also say that it is true that if I want to learn a new language, I think I still learn VB.NET, after all, it is also a new language. In addition, let us think about why VB.NET is so fierce from its pioneers to the present: it is redesigned in order to adapt to the library of the .NET class. Compared to managed and not managed code "C # allows me to write non-managed codes running outside the CLS memory control, I can directly access the memory, and use the pointer. Let the code are free to run, including the management of the use of memory, You can get higher benefits. "This point of view requires consideration: First, we should not discuss performance issues in the Beta version of the development environment. For example: there is a significant management code running speed between the .NET's beta1 and beta2 versions. Second, we can't put non-managed code than the management code, and whether it is worthy of adventure for these benefits. You can see this article on Eric Gunnerson on MSDN. Third, although VB.NET cannot establish a non-managed code, it can access and operate from non-managed memory via the use of System.Runtime.InteropServices namespace. C # has built-in XML file preparatory "C # compiler includes Direct XML file manufacturer that is directly embedded into source code. If I use C #, I also write code and prepare a file." People who have used Javadoc know What is useful to prepare your files to your source code. Source code and file preparation can be updated at the same time, so at least in theory, your document will never have time. However, in my experience, relatively small Java developers are still using javadoc. In this way, the problem becomes "Can you use it?" If your answer to this question is "Yes", you have enough reason to try C #. What about VB.NET? In many real developers, VB is like a toy language, from a certain angle, it is indeed this. So far, VB is much more than the two weaknesses we know.

转载请注明原文地址:https://www.9cbs.com/read-31417.html

New Post(0)