What do you mean by stack and heap in C#?
In C#, Stack is used during the static memory allocation. The variables that are allocated on the stack are stored directly in memory and access to this memory is fast. Heap is used during the dynamic memory allocation. The variables that are allocated on heap have memory allocated during runtime and access to this memory is slow.
Note: If you are preparing for a C# interview, you can read our C# technical interview questions for in-depth knowledge.
BY Best Interview Question ON 14 Feb 2019