C# Interview

Reflection, Dynamic & Runtime

C# interview questions covering reflection, dynamic & runtime.

10 Questions Filter by level

Interview questions

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

10 Results
131
SeniorAdvanced

What is an assembly in .NET?

An assembly is a compiled deployment and versioning unit in .NET. It normally corresponds to a .dll or .exe file.

132
SeniorAdvanced

What is the difference between a namespace and an assembly?

A namespace is a logical naming mechanism used to organize types and avoid naming conflicts. An assembly is a compiled physical and deployment unit containing code and metadata.

133
SeniorAdvanced

What is Intermediate Language (IL) in .NET?

C# source code is normally compiled into Common Intermediate Language, commonly called IL or CIL, together with metadata.

134
SeniorAdvanced

What is JIT compilation in .NET?

JIT stands for Just-In-Time compilation. The JIT compiler converts .NET Intermediate Language into native machine code that the processor can execute.

135
SeniorAdvanced

What is Ahead-of-Time (AOT) compilation in .NET?

Ahead-of-Time compilation generates native code before application execution instead of relying entirely on runtime JIT compilation.

136
SeniorAdvanced

What is reflection, and what are its performance considerations?

Reflection allows runtime inspection and interaction with metadata such as types, properties, methods, constructors, and attributes.

137
SeniorAdvanced

What is the dynamic keyword in C#?

The dynamic keyword tells the compiler to defer member resolution until runtime.

138
SeniorAdvanced

What is the ExpandoObject class?

ExpandoObject is a dynamic object whose members can be added and removed at runtime.

139
SeniorAdvanced

What are custom attributes, and how can they be read with reflection?

A custom attribute is a developer-defined metadata type derived from System.Attribute.

140
SeniorAdvanced

What happens from C# source code to program execution?

The C# compiler first analyzes source code for syntax, type correctness, and language rules. It then normally emits Intermediate Language and metadata into a .NET assembly.