C++ VS C# Key Points

There is a pdf talking about this in detail (in my skydrive). Here just list some key points:

1. To enable polymophyism, we need:
    a. Add virtual in Base class functions. Yes, it's same as c++ does.
    b. Add override in intented child class. It's a must in C# while in C++ no need.

2. For C++, it needs initializer to initialize member variables; while for C#, it needn't as it allows direct initialization in coding (Fields can be initialized during declaration or afterward,).

posted @ 2010-04-05 19:03  能巴  阅读(230)  评论(0编辑  收藏  举报