Dear sreenu,
The information i'm giving as per my knowledge is right.
here is your question result.
Difference between C# and C++
1. C# does not support multiple inheritance.
2. C# does not support pointer types for manipulating. However, they are used in âUNSAFE CODEâ.
3. We can only create objects using new keyword.
4. Arrays are classes in C# and therefore they have built in functionality for operations like searching, sorting and reversing.
5. Arrays are referenced types rather than value types as they are in C++ and therefore stored in the heap.
6. C # does not allow silent fall through in switch statements It requires explicit jump statements at the end of each case statement.
7. In C#, switch can also be used on string values.
8. C# does not support default arguments.
9. In exception handling, unlike in C++ ,we cannot throw ant type in c#. The thrown value has to be reference to a derived class or System.Exception object.
10. We canât access static members via an object , as we can in C++;
11. C# defines null as a keyword and considers it as an intrinsic value.
12. General catch statement catch(â¦) in C++ is replaced by simple catch in C#.
Features of C++ which are dropped
1. Macros
2. Multiple Inheritance
3. Templates
4. Pointers
5. Global variables
6. Default arguments
7. Constants number functions
Enhancement to C#
1. Automatic Garbage Collection
2. Versioning support
3. Strict type safety
4. Delegates and events
5. Boxing and unboxing
6. Web services
I hope u like it.
with regards
Dev
|