Working with Properties and Enums

Everyone
  • 8 videos | 47m 5s
  • Earns a Badge
Rating 5.0 of 2 users Rating 5.0 of 2 users (2)
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 classes
    Recognize how to define a property
    Recognize how to define a property whose value is computed based on the value of another property
    Recognize what the c# compiler generates when you use automatic properties
  • Recognize how the concept of encapsulation applies to properties
    Differentiate between enumerations and constant integers
    Recognize the basics concepts of enumerations
    Recognize 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 Rating 4.5 of 55 users (55)
Rating 4.7 of 6 users Rating 4.7 of 6 users (6)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.1 of 223 users Rating 4.1 of 223 users (223)
Rating 5.0 of 2 users Rating 5.0 of 2 users (2)
Rating 4.0 of 5 users Rating 4.0 of 5 users (5)