O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

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

Defining Methods, Properties, Fields, and Events

The most exciting part of the class designer is that it allows you to do more than define classes and relationships. You can actually stub out code and do refactoring. (See Chapter 9, “Refactoring Code,” for details.)

There are two ways to add code to your classes, structs, interfaces, and the like. The first is to type directly into the designer. For example, if you are in the Properties section of a class, you can right-click and choose to add a new property. This places the property in your class and allows you to edit it in the diagram. This method works for other class members as well. It does have a couple of drawbacks, however. You can’t, for instance, define a full method signature or indicate ...

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