There are two categories
Value types (value type)
and the
Reference types
It is clear that to derive something else everything is objects, perhaps the confusion you have is that the types by value can also be instantiated. This is because when you use int
it's actually an alias of System.Int32
.
All are objects, but do not behave in the same way, when you assign a value to a variable int
when passing it to another copy its content, instead a type by reference will be a pointer to the address in memory.
Changing the value assigned to an int will not affect the other variables that you have assigned with it, whereas if you change a type by reference if it affects them.