Difference between value types and reference types - DOT.NET

What is the difference between value types and reference types?

- Value types are inherited from system.valuetypes.
- Reference types are inherited system.object.

- Value types are stored in a stack.
- Reference types are stored on heap.

- When variables are passed by values as parameters, then no change can be made to them when retrieved.
- When variables are passed by reference, their address is passed due to which a change in their values can be reflected back in the calling function.

- In .NET, when you pass a variable by value, the syntax would be: (ByVal a as datatype)
- And when passed by reference (ByRef a as datatype)
Explain CLR in brief - .NET Common Language Runtime, CLR
CLR stands for Common Language Runtime. The CLR is a development platform......
Describe how a .Net application is compiled and executed - .NET Common Language Runtime, CLR
From the source code, the compiler generates Microsoft Intermediate Language (MSIL) which is further used for the creation of an EXE or DLL.....
Describe the parts of assembly - .NET Common Language Runtime, CLR
An assembly is a partially compiled code library. In .NET, an assembly is a portable executable....
Post your comment