CHAPTER 7Features of a .NET Class

You've been using properties throughout the text, and you looked at an example of an event in Chapter 2. This chapter will go into a bit more detail on properties and events, and will also discuss some features of operators unique to C++/CLI, including static operators and how conversion operators work in C++/CLI vs. classic C++. You'll also learn about casts and conversions.

Properties

As you saw in Chapter 2, in terms of object-oriented programming, properties capture the "has-a" relationship for an object. Properties seem a lot like fields to the consumer of a class. They represent values that can be written to and/or retrieved from. You can use them inside the class as well as outside the class (if they ...

Get Foundations of C++/CLI: The Visual C++ Language for .NET 3.5 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.