C# Interview

C# & .NET Fundamentals

C# interview questions covering c# & .net fundamentals.

10 Questions Filter by level

Interview questions

Open a question for the full answer, code and interview guidance.

10 Results
1
JuniorBeginner

What is C#?

C# is a modern, object-oriented, strongly typed programming language developed by Microsoft. It is widely used with .NET to build web applications, REST APIs, desktop applications, cloud services, mobile applications, games, and enterprise software.

2
JuniorBeginner

What is .NET, and how is it related to C#?

.NET is a development platform that provides the runtime, libraries, frameworks, and development tools needed to build and execute applications.

3
JuniorBeginner

What is CLR in C#/.NET?

CLR stands for Common Language Runtime. It is the execution engine of .NET and manages the execution of .NET applications.

4
JuniorBeginner

What is managed code?

Managed code is code that executes under the control of the .NET CLR. The runtime manages important services such as memory allocation, garbage collection, exception handling, type checking, and thread management.

5
JuniorBeginner

What is the difference between value types and reference types in C#?

Value types contain their data directly, while reference types hold a reference to an object.

6
JuniorBeginner

What is the difference between stack and heap memory?

The stack is primarily associated with method execution frames, parameters, and local variables. The managed heap is used for dynamically allocated objects.

7
JuniorBeginner

What is boxing and unboxing in C#?

Boxing is the conversion of a value type to object or to an interface type implemented by that value type. It involves creating an object representation of the value.

8
JuniorBeginner

What is the difference between var, dynamic, and object?

var uses compile-time type inference. The compiler determines the actual type from the assigned expression, and the variable remains strongly typed.

9
JuniorBeginner

What is the difference between const and readonly in C#?

A const field represents a compile-time constant. Its value must be known at compile time and cannot be changed.

10
JuniorBeginner

What is the difference between == and .Equals() in C#?

Both can compare values, but the exact behavior depends on the type and how equality is implemented.