Junior .
NET Developer Interview Guide
Q: What is the difference between a Class and a Struct in C#?
A: Classes are reference types (stored on the heap), while structs are value types (stored
on the stack). Classes support inheritance, whereas structs do not.
Q: Explain the concept of 'Managed Code'.
A: Managed code is code whose execution is managed by the Common Language
Runtime (CLR). The CLR handles tasks like memory management (Garbage Collection),
security, and type safety.
Q: What is an Interface?
A: An interface is a contract that defines a set of methods, properties, or events without
providing implementation. Classes that implement the interface must provide the logic
for these members.
Q: What is the purpose of the 'using' statement in C#?
A: It is used to define a scope where objects are disposed of automatically at the end of
the block. It is primarily used for types that implement the IDisposable interface, like file
streams or database connections.
Q: What are the access modifiers in C#?
A: Public, Private, Protected, Internal, and Protected Internal. They control the visibility
and accessibility of classes and their members.
Professional .NET Interview Preparation | Technical Assessment