Posts

Showing posts with the label delegation initialization

*EXTRA ENTRY* Properties and Initializers - recap!

Technically, I promised not so many entries but I really feel the need to go over some of this! There was a lot of content in the last couple of sessions that I did not feel were clearly explained enough - no offence Pasan but they were hard to follow! So now is the time to seek out a bit more information. This is very 'casual' - I have an Avengers film on in the background and am not going under any time constraints or anything - I have plenty this evening. So I just want to clarify a few things and get some hands-on practice. Let's go! Properties From Pasan's explanations, there are several different types of these. This is what I know: Stored properties - these are values which are either declared within the class/struct/enum, or declared upon initialization.  Computed properties - these require a calculation and a reference to one of the stored properties, which may not yet have a value. The computed property can be accessed when an instance is create...