Difference Between C++ and C#
C# | C++ |
---|---|
1. In C#, it doesn't support #include statement. | 1. In C++, it supports #include statement. |
2. In C#, there is no need header files. | 2. In C++, there must need header files such as - |
3. In C#, write the Main() function with capitalized. | 3. In C++, write the main() function with small letter. |
4. In C#, it doesn't support default arguments. | 4. In C++, it supports default arguments. |
5. In C#, class definition doesn't use a semicolon (;) at the end. | 5. In C++, class definition uses a semicolon (;) at the end. |
6. C# doesn't provide any default constructor. | 6. C++ provides default constructor. |
7. In C#, we can't access static members via an object. | 7. In C++, we can access static members via an object. |
8. In C#, it doesn't support pointer types of manipulating data. | 8. In C++, it supports pointer. |
9. In C#, we can't throw any type value. | 9. In C++, we can throw any type value easily. |
10. C# doesn't support Multiple Inheritance | 10. C++ supports Multiple Inheritance |
Recommended Posts:
C#
1. C# Features
2. Difference Between C++ and C#
3. Difference Between C# and Java
4. .NET Framework
5. Benefits of .NET
6. C# Program Structure
7. C# Command Line Arguments
8. Console.ReadLine() and Console.WriteLine()
9. C# Literals
10. C# Data Types
11. Scope of Variables in C#
12. Boxing and Unboxing in C#
13. C# Operators
14. C# Type Casting