// COM required manual reference counting in older languages
// dot NET replaced this with automatic garbage collection
var obj = new MyManagedClass(); // no manual release needed
.NET Framework Fundamentals
14 questions found
COM, or Component Object Model, is an older Microsoft technology that allows software components to communicate with each other regardless of the programming language they were written in, mainly used before dot NET existed. Its main disadvantages include complex registration requirements in the Windows registry, poor memory management since developers had to manually manage reference counting, lack of true cross platform support, and difficulty maintaining version compatibility, all of which dot NET was designed to solve with its managed runtime and simpler component model.
Real-world example
A legacy Windows desktop application built with COM components struggled with registration issues whenever it was deployed to a new machine, which was a major reason the company eventually rewrote it using dot NET.
What .NET Represents?;Explain CLR and its Execution Process.
dot NET represents a complete software development platform created by Microsoft that provides everything needed to build, run, and manage modern applications, including a runtime environment, a large set of reusable libraries, and multiple programming languages such as C#, F#, and Visual Basic dot NET. It represents a unified ecosystem where developers can build web applications, desktop applications, mobile apps, cloud services, and more, all sharing common tools and libraries.
// The same dot NET platform can build very different app types
// Web API, console app, and desktop app all use dot NET
dotnet new webapi -o MyApi
Real-world example
A software company standardizes its entire product line, from web APIs to desktop tools, on the dot NET platform, allowing developers to move between projects easily since they all share the same core language and libraries.
What is a Framework and what does the .NET Framework provide?;What is exactly .NET?
A framework is a pre built set of tools, libraries, and rules that developers use as a foundation to build applications faster and more consistently, instead of writing every piece of functionality from scratch. The dot NET Framework specifically provides the Common Language Runtime for executing code, the Base Class Library for common tasks like file handling and networking, and technologies such as ASP.NET for web development and Windows Forms or WPF for desktop applications, all running only on Windows.
// The dot NET Framework provides ready made classes
using System.IO;
File.WriteAllText("log.txt", "Application started");
Real-world example
A Windows desktop application built with the dot NET Framework uses its built in file handling and networking libraries instead of writing low level code to read files or make network requests from scratch.
What .NET Represents?;Explain about BCL.
The Common Language Runtime, or CLR, is the execution engine of dot NET that manages running applications, handling tasks such as memory management through garbage collection, exception handling, thread management, and security. The execution process starts when source code, written in a language like C#, is compiled into an intermediate language called CIL or MSIL, and when the application actually runs, the CLR's Just In Time compiler converts that intermediate language into native machine code specific to the computer it is running on, which is then executed directly by the processor.
// C# source code
Console.WriteLine("Hello");
// Compiled to CIL, then JIT compiled to native code at runtime
// This happens automatically when you run: dotnet run
Real-world example
A dot NET application written in C# runs correctly on any machine with the correct runtime installed because the CLR converts the same intermediate language into machine code appropriate for that specific processor at the moment it executes.
What is the Just-In-Time (JIT) compilation?;What are the differences between managed code and unmanaged code?
dot NET is a free, open source developer platform created by Microsoft for building many different types of applications, including web, mobile, desktop, gaming, IoT, and cloud based applications. It consists of a runtime that executes your code, a set of programming languages like C# and F#, and a huge collection of libraries that provide ready made functionality, all designed to work together so developers can build applications efficiently using consistent tools regardless of what type of application they are creating.
// One platform, many app types
dotnet new console
dotnet new webapi
dotnet new mvc
Real-world example
A startup builds its customer facing website, its internal admin tool, and its backend API all using dot NET, letting the same team of developers work productively across every part of the product using shared knowledge and libraries.
What .NET Represents?;What are the main differences between .NET Core and .NET 5/6/7/8?
A programming language is a formal set of instructions and syntax rules that allows developers to communicate with a computer and tell it exactly what actions to perform, since computers only understand machine code at the lowest level. Programming languages are needed because writing raw machine code directly is extremely difficult and error prone for humans, so languages like C# provide a much more readable and structured way to express logic, which is then translated into machine instructions the computer can actually execute.
// Readable C# code instead of raw machine instructions
int total = 10 + 20;
Console.WriteLine(total);
Real-world example
A developer writes a payroll calculation using clear, readable C# statements instead of manually crafting binary machine instructions, making the code easy for other developers to understand, review, and maintain later.
What is C#?;What is exactly .NET?
Technology, in the context of software development, refers to the specific tools, frameworks, platforms, and techniques used to build and run applications, such as dot NET, databases, or cloud services. Technology is needed because it provides proven, tested solutions to common problems, allowing developers to build reliable software faster by relying on established patterns and tools rather than solving the same fundamental challenges, like data storage or user authentication, from scratch on every single project.
// Using an established technology (EF Core) instead of writing raw data access code
var customers = await _context.Customers.ToListAsync();
Real-world example
A team building a new application chooses established technologies like dot NET and SQL Server rather than building custom low level solutions, allowing them to focus their time on solving the actual business problem instead of reinventing basic infrastructure.
What are the language and its need?;What is Visual Studio?
Visual Studio is Microsoft's full featured integrated development environment, or IDE, used to write, debug, test, and deploy applications, particularly those built with dot NET and C#. It provides features like intelligent code completion, an integrated debugger, project and solution management, built in source control support, and various designers for building user interfaces, making it one of the most widely used tools for dot NET development.
// Visual Studio provides IntelliSense as you type
public class Customer {
public string Name { get; set; } // suggestions appear automatically
}
Real-world example
A development team uses Visual Studio's integrated debugger to step through their application line by line, quickly identifying the exact cause of a bug that would have been much harder to find using only text editors and manual console output.
What are Technology and its need?;Explain about BCL.
The Base Class Library, or BCL, is the core set of libraries included with dot NET that provides fundamental functionality every application commonly needs, such as working with strings, collections, files, dates, networking, and basic data types. Because the BCL is included with every dot NET installation, developers can rely on these classes being available and consistent across applications, instead of needing to write or install this basic functionality themselves.
using System;
using System.Collections.Generic;
using System.IO;
var list = new List<string> { "apple", "banana" };
File.WriteAllLines("fruits.txt", list);
Real-world example
A developer building a reporting tool uses the Base Class Library's built in collection classes and file writing methods to generate and save a report, without needing any third party libraries for such basic operations.
What is a Framework and what does the .NET Framework provide?;What are Metadata and an assembly?
Just In Time compilation is the process where the Common Language Runtime converts intermediate language code, called CIL, into native machine code at the moment a method is actually called during program execution, rather than compiling the entire application ahead of time. This approach allows the JIT compiler to optimize the generated machine code specifically for the exact processor and environment the application is running on, and once a method has been compiled, that native code is cached and reused for subsequent calls to the same method, improving performance.
// The method is JIT compiled the first time it is called at runtime
public int Add(int a, int b) {
return a + b;
}
Real-world example
A dot NET application deployed to different customer machines with different processor types automatically benefits from JIT compilation, since each machine gets machine code optimized specifically for its own hardware rather than a single generic build.
Explain CLR and its Execution Process.;What are the differences between managed code and unmanaged code?
Showing 1–10 of 14