Class vs Struct
Overview
Value Type vs Reference Type
Value Type: Each instance keeps a unique copy of data in memory (Logan Koskenka).
Reference Type: Each instance shares a single copy of data (Logan Koshenka).
Value Types:
Structures
Enumarations
Strings
Integers
Dictionaries
Arrays
Reference Types
Classes
Closures
Functions
The functionality of class over a struct
It will inherit properties and results from the other class and add to it. It means if you want to use tha data in other views you should use Class, but if you don't want to than use Struct.
Inheritance
Class inherits the property but Struct does not
Sources
Videos
Articles / Documents
Last updated
Was this helpful?