Working with Properties and Enums
- 8 videos | 47m 5s
- Earns a Badge
The setting and getting of values in an instance of a class is a very common pattern in C# programming. In fact, .NET has a mechanism called properties that allows the coder to call set and get methods. There are still get and set methods implemented and being run behind the scenes, it's simply that properties look nicer than having get and set methods scattered through the code. In addition to making the code cleaner, the .NET properties feature also encodes the semantics of being able to set and get properties of an instance. In this course, you'll learn how to use properties to improve the interface of your classes. You'll examine the motivation for properties and learn how to expose a private field as a property. Finally, you'll explore how to define an automatic property and set properties in an object initializer. This course was originally created by Global Knowledge (GK).
WHAT YOU WILL LEARN
Recognize how properties can be used to improve the interface of your classesRecognize how to define a propertyRecognize how to define a property whose value is computed based on the value of another propertyRecognize what the c# compiler generates when you use automatic properties
Recognize how the concept of encapsulation applies to propertiesDifferentiate between enumerations and constant integersRecognize the basics concepts of enumerationsRecognize how to apply enumerations within a class
IN THIS COURSE
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.Digital badges are yours to keep, forever.
YOU MIGHT ALSO LIKE
Rating 4.5 of 55 users (55)
Rating 4.7 of 6 users (6)