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

  • Playable
    1. 
    Using Properties
    7m 50s
    UP NEXT
  • Playable
    2. 
    Defining Properties
    7m 12s
  • Locked
    3. 
    Creating a Computed Property
    3m 50s
  • Locked
    4. 
    The Compiler and Automatic Properties
    5m 47s
  • Locked
    5. 
    Properties and Encapsulation
    6m 29s
  • Locked
    6. 
    Enumerations vs. Constant Integers
    7m 4s
  • Locked
    7. 
    Exploring Enumerations
    3m 14s
  • Locked
    8. 
    Apply Enumerations within a Class
    5m 39s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.