.Net Framework Flashcards
What is the .NET Framework architecture?
The .NET Framework architecture is a software platform developed by Microsoft that consists of the Common Language Runtime (CLR) and the Base Class Library (BCL). It provides tools and libraries for building various types of applications.
What is the Common Language Runtime (CLR)?
The CLR is the execution environment in the .NET Framework responsible for managing memory, handling exceptions, managing security, and executing code written in different languages.
Explain the role of the Base Class Library (BCL) in .NET Framework.
The BCL is a collection of classes and functions that provide fundamental building blocks for .NET applications, such as data types, input/output, networking, and more.
What is Managed Code?
Managed code is code that runs within the CLR environment, providing features like memory management, automatic garbage collection, and enhanced security.
What is Unmanaged Code?
Unmanaged code refers to code that is executed outside the CLR’s control and doesn’t adhere to .NET’s memory management and security features.
How does the CLR ensure memory management and garbage collection?
The CLR manages memory using automatic garbage collection. It keeps track of object references and automatically releases memory when objects are no longer reachable
Explain the Just-In-Time (JIT) compilation process.
The JIT compilation converts Intermediate Language (IL) code into machine-specific instructions at runtime, optimizing performance by adapting to the executing system’s architecture.
What are assemblies in .NET?
Assemblies are the basic unit of deployment and version control in .NET. They contain compiled code, metadata, and resources needed to execute an application.
Differentiate between value types and reference types.
Value types store their data directly, while reference types store a reference to their data. Value types are stored on the stack, and reference types are stored on the heap.
What is the Global Assembly Cache (GAC)?
The GAC is a central repository for storing and managing shared assemblies that are accessible across different applications on the same machine.
How does .NET provide language interoperability?
.NET supports language interoperability through the Common Type System (CTS) and Common Language Specification (CLS), which define a common set of data types and rules for interaction between languages.
Explain the role of the AppDomain.
An AppDomain is a lightweight, isolated environment within a process that provides isolation and security boundaries for executing .NET applications.
What is Reflection and what is it used for?
Reflection allows a program to inspect and interact with metadata about types, methods, properties, and more at runtime. It’s commonly used for tasks like dynamic loading and invocation of assemblies.
How does .NET handle exceptions?
.NET provides a structured exception handling mechanism through try-catch blocks. Exceptions are objects that inherit from the System.Exception class.
What is Boxing and Unboxing?
Boxing is the process of converting a value type to a reference type, and unboxing is the process of converting a reference type back to a value type.