
C# 6 and .NET Core 1.0

There are two categories of memory: stack memory and heap memory. Stack memory is fast but limited and heap memory is slower but plentiful.
There are two C# keywords that you use to create object types: class
and struct
. Both can have the same members. The difference between the two is how memory is allocated and the lifetime of their variables.
Technically, how memory is allocated is an implementation detail and not part of the C# or .NET specifications. Alternative implementations could choose to store instances of a struct
type on the heap! You can read more about how value types are stored here: https://blogs.msdn.microsoft.com/ericlippert/2010/09/30/the-truth-about-value-types/.
When you define a type using class
, you are defining a reference type. This means that the memory for the object itself is allocated on the heap along with some overhead consisting of a pointer to the object's method table and an object that is used to synchronize...
Change the font size
Change margin width
Change background colour