1. What is the .NET Framework and why is it important?
.NET Framework is a Microsoft platform used to build and run applications. It provides CLR,
libraries, and tools which make application development easy, secure, and reliable.
2. What is the Common Language Runtime (CLR)?
CLR is the execution engine of .NET. It manages memory, garbage collection, security, exception
handling, and execution of programs.
3. What is the Framework Class Library (FCL)?
FCL is a collection of reusable classes, interfaces, and methods. It helps developers perform
common tasks like file handling and database access.
4. What is the purpose of Common Language Specification (CLS)?
CLS defines a set of rules that .NET languages must follow to ensure language interoperability.
5. What are assemblies in .NET? Name their types.
Assemblies are compiled code units in .NET. Types are: Private Assembly and Shared Assembly.
6. What is Just-In-Time (JIT) compilation?
JIT converts Intermediate Language (IL) code into machine code at runtime, improving
performance and efficiency.
7. What is the Global Assembly Cache (GAC)?
GAC is a storage location for shared assemblies. It allows multiple applications to use the same
assembly.
8. What is Visual Studio IDE?
Visual Studio is an Integrated Development Environment by Microsoft. It is used to develop, debug,
and test applications.
9. What is the role of Solution Explorer in Visual Studio?
Solution Explorer shows all files, folders, and references of a project and helps manage project
structure.
10. What is the Properties Window used for?
Properties Window is used to view and change properties of selected controls or objects.
11. What is a variable? Give an example.
A variable stores data in memory. Example: int a = 10;
12. What is a data type? Name any four built-in data types.
Data type defines the type of data a variable can store. Examples: int, float, double, char.
13. Difference between value types and reference types.
Value types store data directly, while reference types store memory address of data.
14. What is variable scope?
Variable scope defines where a variable can be accessed in a program.
15. What is a class and an object?
Class is a blueprint, and object is an instance of a class.
16. What is the purpose of a constructor in C#?
Constructor initializes objects and allocates resources when an object is created.
17. What is an operator? Give examples of arithmetic operators.
Operators perform operations on variables. Examples: +, -, *, /.
18. What is precedence of operators? Why is it important?
Operator precedence defines execution order. It is important to get correct results.
19. Difference between if-else and switch statements.
if-else is used for conditions, while switch is used for multiple fixed choices.
20. Difference between while loop and do-while loop.
while loop checks condition first, do-while executes at least once.