CHAPTER 8

image

Polymorphism and Protection

We have met the enemy and he is us.

—Walt Kelly (Pogo)

Both C# and C++ are object-oriented languages, which means that both languages support the creation of objects that encapsulate not only data but associated methods or operations on that data. Both languages also provide mechanisms to relate different objects to one other, ranging from operator overloading to inheritance, interfaces, and parametric polymorphism. Both languages provide mechanisms to restrict and control the access to data, ranging from limitations on accessibility and visibility to canning and filtering data using properties.

In this ...

Get C++ 2013 for C# Developers,Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.