It would be great if we as devs got to play with limitless memory and never had to care about working with it judiciously. Unfortunately, that isn’t true, and hence, we have to behave like a renter to the OS—rent the memory for a while, use the memory, and then hand it back.
Value types are faster to work with since they operate out of the stacks and copying a value is cheap since it happens in a constant time. Values also help us achieve predictable behaviour and isolation whereas, on the other hand Reference types give shared access to Memory locations and dynamic storage. Since reference types […]