Title C # and VB.net difference Qianqian (original)

Source: Internet
Author: User
Tags exception handling garbage collection inheritance
Difference between the title C # and VB.net Qianqian (original)

Keyword c#,vb.net,.net, difference



All said in. NET, the. NET Framework and the CLR are the basis for application operations. So vb.net and C # are exactly the same, just different grammar? Please look at the information I have collated.




One, C #




---as simple as VB, a new language as powerful as C + +




C # is a first-class component-oriented language
3 years design by Anders Hejlsberg, chief designer of Turbo Pascal, Delphi, and Visual J + +
All the language elements are real objects.
Develop strong and reusable software
All the base class libraries in the. NET Framework (base Class library) are written by C #





Second, vb.net




---Fully object-oriented basic language




1. New language Features
Fully object-oriented-Inheritance (inheritance), overload (overloading), shared members, structured exception handling
Strong language – rigorous type checking, initialization of variable declarations, support for garbage collection (garbage collection)
Powerful – Support delegates (delegates), free threading,variant data type replaced by Object
2. The grammar consistent with VB6





The difference between the three and 2 people?



1. Grammatical differences



such as the writing of loops



vb.net



For I = 1 to 10
' For loop
Next I



C#



for (i=1;i<11;i++) {
For loop
}




In addition, visual Basic is insensitive to case, and C # is case sensitive.



2.c# has features that Visual Basic does not have







Pointers, shift operators, embedded documents (XML)
Overloaded operators



3.Visual Basic has a feature that C # does not have



Richer grammar: Events, Try ... Catch, Select ... case, realize Interface
Late binding (Late binding), dynamic array, module (modules), optional parameters, parameter properties (parameterized properties)
Background compilation



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.