Sunday, November 18, 2018 18:17

Posts Tagged ‘value and reference types’

Stack vs Heap memory

Wednesday, August 15th, 2018

Today we are going to talk all about memory. There are multiple types of memory when it comes to software, but for now we are only interested in two of them: the Stack and the Heap. Whenever we execute a program, its instructions are loaded into the RAM of the computer, and the operating system will allocate a bunch of physical RAM, so that the executable can run.… Read more

Structures

Saturday, June 24th, 2017

In C# and .NET framework, there are two implementations of the concept of “class”, from the OOP point of view: classes and structures.

While we already know that classes are defined using the class keyword, structures are defined using the keyword struct.… Read more

Strings

Friday, April 21st, 2017

So far, we have often used Console.ReadLine() in our Console programs, in order to get some text input from the user. Whenever we needed to use that text (and even inspecting the Console.ReadLine() method signature), we needed to store that text in a string variable type.… Read more

Value and reference types

Tuesday, January 3rd, 2017

Variables in C# can be categorized in two main types: value and reference types. What is the difference between them?

Value types are stored in a special area which is called the execution stack and their value is directly stored and accessed.… Read more