Classes

Conclusion

< Previous

In this tutorial you learned

  • What a class is
  • How to declare a class in code
  • How to create an instance of your class
  • How to add methods to a class
  • How to add properties to a class
  • What a constructor is, and how to add it to a class

In this tutorial we learnt what a class is and why they are used. We also discovered how to add methods and properties to manage the internal state of our classes. We created an example class called Person which represents a person with a Name and an Age.

 

In the next tutorial "Visibility and Accessibility Modifiers" you will learn

  • What is a modifier
  • What are the different types of modifiers
  • How do I add modifiers to classes, constructors, methods and properties
  • When to use modifiers in your code.
Page 20 of 20
< Previous