I'm learning C# from the book "Head First C#". I thought I understood properties. They are used like fields but work like methods, with getters and setters. I never thought of them as another object appending to the instantiated object. Is that the case?
Please see the code given in the book and the Outfit object which got me thinking about this.
Thank you so much for your help!!
Follow-up questions:
- Is it the case that when an object is instantiated, all of its properties will also be instantiated as objects on the heap, except for the value types?
- Why isn't there a
HairStyle
object connected to theGuy
object in this case?