O'Reilly logo

Foundations of C++/CLI: The Visual C++ Language for .NET 3.5 by Gordon Hogenson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required