Migration from C++ to C# – Mini Course

This mini-course was taught by me last in 2009-10, if I recall correctly, for IInd M.Sc. (Maths) students in a deemed university in Andhra Pradesh, India, as part of a course on ASP.Net Web programming.

Pre-requisites for the course: It so happened that students of this course had studied C and C++ languages. So C++ is a pre-requisite for this course.

Migration from C++ to C#

[Note example C# source files referred in the Powerpoint presentations below as not (given) in the C# specification document are available here.]

1) Powerpoint presentation: CPPtoCsharp1. This covers: Course introduction, Course material for C++ to C# migration – Chapter 1, Introduction, of the document ‘C# Language Specification Version 1.2’ from Microsoft: http://download.microsoft.com/download/5/e/5/5e58be0a-b02b-41ac-a4a3-7a22286214ff/csharp%20language%20specification%20v1.2.doc (later versions of C# Language specification were available then itself but Chapter 1, Introduction, of this document was felt more suitable as a tutorial), C# features, Hello world app., Value and Reference types, comparison between Reference in C++ and C#, string class, boxing and unboxing, and program structure.

2) Powerpoint presentation: CPPtoCsharp2. This covers: List class – constructor, properties, read-only and read-write properties and indexer.

3) Powerpoint presentation: CPPtoCsharp3. This covers: event-driven programming, events, quick understanding of delegate, publisher-subscriber relationship, delegate type, event-delegate and event example.

4) Powerpoint presentation: CPPtoCsharp4. This covers: operators, destructors, struct, arrays, interface, IControl interface, class implements interface, interface knowledge reuse, interface – contract, interface variables/types, interface inheritance, interface – multiple inheritance, class – multiple interfaces, interface – methods, properties, events & indexers.

5) Powerpoint presentation: CPPtoCsharp5. This covers: enums, delegate, delegate vs. function pointers, delegate example, multi-cast delegate, event vs. delegate and attributes.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s