Structs

A_Struct

structs are typed that can store name properties and define there own behaviors.

  • structs are value type and classes are reference type.
  • structs memory allocation is done on stack and for classes memory allocation was done on heap
  • we can use variables and functions inside a struct.
  • there is no inheritance in the struct like classes

methods