Differences and relationships between vc6, vc.net, vc7, vc8, vc9, C, C ++, and C #

Source: Internet
Author: User
Tags vc9

1.vc.net developedProgram,. Net program requires framework support, and computers without framework installation cannot run;
2. The program developed by vc6.0 is faster than that developed by. net;
3. vc6/vc2003/vc2005/vc2008 support MFC;
4. the. NET-based program has powerful functions and beautiful interfaces. It can also be used across platforms (running on Windows XP and other operating systems ).
5.vc.net indicates that. and vc7 or vc8. net; vc7 or vc8 programs, if used.. Net (for example, CLR program) requires the support of the Framework. Otherwise (for example, the MFC program) can run independently.
6.vc.net integrates many common programs to simplify programming. On average, vc.net can reduce the workload by 70%.Programming LanguageTogether, it provides convenience for mixed programming;
7.vc.net's C section is more standard than that supported by VC 6. The MFC part is certainly newer than vc6 and supports some new features;
8.vc.net there are two types of VCCode, A kind of hosting C code is the intermediate code that will be compiled into. Net, which must be supported by the. NET Framework. There is also the traditional unmanaged code, that is, the code is directly compiled into the execution program, which is the same as the Code Compiled by 6.0, but there are many updates.
9.vc.net is more portable (only for various windows );
10.vc.net requires a lot of memory for installation. The difference between VC. NET and vc6.0 on MFC is not very big. It adds some libraries and does not have classwizard.
Differences and relationships between vc6 and vc8 (vc2005)
1. VC ++ 2005 contains VC ++ 6.0. Only the function library has some changes and some file structures have been modified. but VC ++ 2005 not only contains the traditional VC ++, but also contains VC ++.. net, you can write hosted C ++ applications, that is.. NET application.

Differences between C, C ++, and C #

To tell the difference, you must first talk about the relationship. I don't remember where I saw such a sentence: C is grandpa, C ++ is Dad, and C # is the grandson of C. This image shows the relationship between the three.
In terms of time sequence, the first appearance between them is C, then C ++, and finally C #. C ++ introduced object-oriented to solve the software crisis. C # competed for the product in the market to achieve platform unification and Java.
In terms of performance, C has the highest efficiency, followed by C ++, and C # has the lowest efficiency. C is a process-oriented structured programming language. It features a small language size, high efficiency, flexible language, and small restrictions on the program. It can also conveniently perform operations on the lower layer, therefore, it is very suitable for developing operating systems, drivers, embedded programs and other programs with high speed requirements. C ++ is fully compatible with C. The most significant difference between C ++ and C is that it adds an object-oriented component, that is, the concept of classes, because of its increase, software development can easily describe human thinking, making software development and maintenance relatively simple and directly reducing software costs, however, C ++ is an object-oriented language, which restricts its speed. Therefore, C ++ is suitable for developing large projects, most modern languages use some features of C ++ and C more or less. C # included in. NET platform is an object-oriented network-oriented component-oriented language. It is similar to Java in many aspects and is good at developing network programs. therefore, to be more precise, C # is a requirement. the development language supported by the. NET platform. It is meaningless to simply look at C #. You need to understand it. NET platform development knowledge.
From the compilation perspective, C/C ++ compiles and generates target files with machine codes that can be directly understood by the CPU, while C # compiles and generates msil (Microsoft intermediate language) this language cannot be directly executed by the CPU, but relies on. net Framework translation (just-in-time compiling) to opcode and then sent to the CPU for execution. Therefore, this is why C # has the lowest operating efficiency.

 

Syntax and function differences between C ++ and C #

The following table lists important comparisons between C ++ and C # functions. If you are a C ++ programmer, this table will provide you with the most important differences between the two languages.
Note that C ++ and C # projects are derived from different project models. For information on differences between C ++ and C # projects, see manage items in the project and use Solution Explorer.
Function Reference topic
Inheritance: A class can only inherit the implementations of one base class. In addition, classes or interfaces can implement multiple interfaces.
Array: the syntax for declaring the C # array is different from that for declaring the C ++ array. In C #, the "[]" mark appears after the array type.
Bool type: There is no conversion between the bool type and other types (especially INT.
Long TYPE: in C #, the long data type is 64-bit, and in C ++, It is 32-bit.
Struct type: in C #, classes and structures are different in semantics. Struct is a value type, while class is a reference type.
Switch statement: Unlike the switch statement in C ++, C # does not support passing through one case label to another.
Delegate type: the delegate is similar to the function pointer in C ++, but the former is type-safe and secure.
Override base class members from a derived class call.
Use the new modifier to explicitly hide inherited members.
The override keyword is required to declare the rewrite method.
Preprocessor commands are used for Conditional compilation. C # does not use header files.
Exception Handling: Use finally statements.
C # Operator: C # supports other operators, such as is and typeof. It also introduces different functions of some logical operators.
Use of the keyword extern.
Keyword static.
Replaces the C ++ initialization list method on the construction base class.
C # general program structure: namespace, class, structure, delegate, and enumeration.
The main method is different from the main function declaration method in C ++.
Method parameters: C # supports the ref and out parameters, which replace the pointer and pass the parameters through reference.
In C #, pointers are used only in insecure mode. Unsafe
In C #, the overload operator is executed in different ways.
String: the C # string is different from the C ++ string. String
The foreach keyword allows you to access arrays and collections cyclically. Foreach, in
C # does not contain global methods and global variables: Methods and variables must be included in type declarations (such as class or struct.
C # does not contain header files or the # include command: The using command is used to reference types in namespaces that are not fully qualified.
Local variables in C # cannot be used before initialization.
Destructor: in C #, the call time of the Destructor cannot be controlled because the Destructor is automatically called by the garbage collector.
Constructor: similar to C ++, if Class constructor is not provided in C #, default constructor is automatically generated for you. The default constructor initializes all fields as their default values.
C # bit fields are not supported. C ++ bit domain
The input/output service and format settings of C # depend on the Runtime Library of. NET Framework.
In C #, method parameters cannot have default values. To achieve the same effect, use method overload.

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.