What are the differences between system.stringbuilder and system.string?

System.string is immutable and fixed-length, whereas StringBuilder is mutable and variable length. The size of .string cannot be changed, but that of .stringbuilder can be changed. In a .NET interview, when asked about the differences between System.StringBuilder and System.String, you could provide the following points: Mutability: System.String objects are immutable, meaning their values cannot be … Read more

What is the difference between Stack and Queue?

The values in a stack are processed following the LIFO (Last-In, First-Out) principle, so all elements are inserted and deleted from the top end. But a queue lists items on a FIFO (First-In, First-Out) basis in terms of both insertion and deletion. The elements are inserted from the rear end in a queue and deleted … Read more

What is the difference between Stack and Heap?

The stack is used for static memory allocation and access to this memory is fast and simple to keep track of. Heap is used for dynamic memory allocation and memory allocation to variables happens at run time. Accessing the heap memory is complex and slower compared to stack. In the context of .NET development, understanding … Read more

What are EXE and DLL?

EXE is an executable file that works as an application and it runs individually as it contains an entry point. DLL is a Dynamic Link Library which is a supportive file to other applications, and it cannot run individually. In a .NET context, both EXE (Executable) and DLL (Dynamic Link Library) files are crucial components … Read more

Explain the difference between value type and reference type

Types in .NET Framework are either Value Type or Reference Type. A Value Type is stored in the stack and it holds the data within its own memory allocation. While a Reference Type is stored in the heap and it contains a pointer to another memory location that holds the real data. In .NET interviews, … Read more