Frequently asked .NET interview questions - 2023 (updated)
- What is .NET architecture?
.NET architecture is a collection of technologies that provide an infrastructure for developing Windows and web applications, which includes languages, libraries, frameworks, and tools. - What is the difference between .NET Framework and .NET Core?
.NET Framework is a full-featured development platform that runs only on Windows, while .NET Core is a modular, open-source, cross-platform development framework that can run on Windows, Linux, and macOS. - What are the different types of .NET applications?
The different types of .NET applications include Windows Forms, Web Forms, Console Applications, ASP.NET, and Windows Services. - What is the Common Language Runtime (CLR)?
The Common Language Runtime (CLR) is the runtime environment in .NET that manages the execution of code and provides services such as memory management, garbage collection, exception handling, and security. - What is managed code?
Managed code is code that is executed by the CLR, which provides services such as memory management, garbage collection, and exception handling. - What is an assembly in .NET?
An assembly is a self-contained unit of code that contains metadata about the types, methods, and other elements in the code, as well as the IL code itself. - What is the Global Assembly Cache (GAC) ?
The Global Assembly Cache (GAC) is a machine-wide repository for .NET assemblies that are intended to be shared across multiple applications.
- What is Reflection in .NET?
Reflection is a feature in .NET that allows you to inspect and manipulate the metadata of types and objects at runtime. - What is the difference between Early binding and Late binding in
.NET?
Early binding is when the type of an object is known at compile time, while Late binding is when the type of an object is determined at runtime. - What is the difference between Abstract class and Interface in .NET?
An abstract class can contain both abstract and non-abstract methods, while an interface can only contain method signatures. An abstract class can also have fields and constructors, while an interface cannot. - What is the difference between Static class and Singleton class in
.NET?
A static class is a class that cannot be instantiated, while a singleton class is a class that can only have one instance created. - What is the difference between Boxing and Unboxing in .NET?
Boxing is the process of converting a value type to a reference type, while unboxing is the process of converting a reference type back to a value type. - What is the difference between a Thread and a Process in .NET?
A thread is a unit of execution within a process, while a process is a separate instance of a program that runs independently of other processes. - What is a Delegate in .NET?
A delegate is a type that represents a reference to a method with a particular signature, which can be used to call that method or pass it as a parameter. - What is a Lambda Expression in .NET?
A lambda expression is a concise way of defining an anonymous function that can be used to pass a function as a parameter or assign it to a variable. - What is an Extension Method in .NET?
An extension method is a static method that can be used to add new functionality to existing types without modifying the original type. - What is an Attribute in .NET?
An attribute is a declarative tag that can be applied to various elements in code to provide additional information about that element.
18. What is the difference between IEnumerable and IQueryable in .NET?
The main difference between IEnumerable and IQueryable is in how they handle
queries. When you execute a query against an IEnumerable collection, the query
is performed locally in memory, meaning that all the data in the collection is
loaded into memory and processed on the client-side. This can be inefficient
for large collections, and can result in poor performance.
In summary, IEnumerable is a simple interface that represents a non-generic collection, while IQueryable extends IEnumerable and provides a set of query operators that can be used to efficiently query data sources. The main difference between the two is that IQueryable allows for more efficient queries by performing the query on the data source itself, and supports deferred execution of queries.
19. What
is LINQ in .NET?
LINQ (Language Integrated Query) is a
set of technologies in .NET that provide a unified approach to querying data
from different data sources using a common syntax.
19. What
is ASP.NET MVC?
ASP.NET MVC (Model-View-Controller) is a
web application framework in .NET that separates an application into three main
components: the model (data), the view (UI), and the controller (logic).
20. What is Web
API in .NET?
Web API is a framework in .NET that
allows you to build RESTful web services that can be consumed by different clients,
such as web applications or mobile apps.
21. What is
Entity Framework in .NET?
Entity Framework is an ORM
(Object-Relational Mapping) framework in .NET that allows you to interact with
databases using a high-level object-oriented interface, without writing SQL
queries.
22. What is
ADO.NET in .NET?
ADO.NET (ActiveX Data Objects .NET) is a
set of technologies in .NET that provide a way to access and manipulate data
from different data sources, such as databases or XML files.
23. What is WCF
in .NET?
WCF (Windows Communication Foundation)
is a framework in .NET that allows you to build distributed systems using
different communication protocols, such as HTTP, TCP, or MSMQ.
24. What is the
difference between REST and SOAP?
REST (Representational State Transfer)
is an architectural style that uses HTTP verbs and URLs to represent resources,
while SOAP (Simple Object Access Protocol) is a protocol that uses XML messages
and can use different transport protocols.
25. What is the
purpose of IIS in .NET?
IIS (Internet Information Services) is a
web server in Windows that hosts and manages web applications, such as ASP.NET
applications.
26. What is the
purpose of ASP.NET Core middleware?
ASP.NET Core middleware is software
components that can be used to handle HTTP requests and responses in an ASP.NET
Core application, such as authentication, logging, or routing.
27. What is the
purpose of Dependency Injection in .NET?
Dependency Injection is a design pattern
in .NET that allows you to separate the creation and management of objects from
their dependencies, making your code more modular, testable, and maintainable.
28. What is the
purpose of the SOLID principles in .NET?
The SOLID principles are a set of
guidelines in .NET that promote good object-oriented design, such as Single
Responsibility Principle, Open-Closed Principle, Liskov Substitution Principle,
Interface Segregation Principle, and Dependency Inversion Principle.
29. What is the
purpose of design patterns in .NET?
Design patterns are reusable solutions
to common software design problems in .NET, such as Factory, Singleton, Adapter,
Decorator, or Observer.
30. What is
Garbage Collection in .NET?
Garbage Collection is a process in .NET
that automatically frees memory that is no longer used by the application,
which helps to prevent memory leaks and improve performance.
31. What is the
purpose of AppDomain in .NET?
AppDomain is a boundary in .NET that
isolates a group of assemblies and provides a separate environment for their
execution, which helps to improve security, reliability, and manageability.
32. What is
Reflection.Emit in .NET?
Reflection.Emit is a feature in .NET
that allows you to generate IL code at runtime and create dynamic types and
methods, which can be useful for code generation, optimization, or dynamic
programming.
33. What is the
purpose of Unit Testing in .NET?
Unit Testing is a software testing
approach that involves testing individual units or components of a software
application in isolation to ensure that they function as intended. In .NET,
unit testing is often used to ensure that code written in C#, VB.NET, or other
.NET languages meets the expected behavior and Overall, the purpose of Unit
Testing in .NET is to ensure that each individual unit of code is reliable,
maintainable, and functions as intended, which helps to improve the quality and
reliability of the application as a whole.
34. What is
Mocking in .NET?
Mocking is a technique in .NET that
involves creating fake objects (mocks) to simulate the behavior of real objects
during testing, which helps to isolate the unit under test and improve test
coverage.
35. What is
Code Review in .NET?
Code Review is a practice in .NET that
involves reviewing code written by other developers to identify defects, improve
quality, and share knowledge, which helps to prevent bugs, increase
collaboration, and maintain standards.
36. What is
Continuous Integration in .NET?
Continuous Integration is a practice in
.NET that involves building, testing, and deploying software changes
automatically and frequently, which helps to improve quality, reduce risk, and
increase feedback.
37. What is
Continuous Deployment in .NET?
Continuous Deployment is a practice in
.NET that involves automatically deploying software changes to production as
soon as they pass a series of tests and quality checks, which helps to increase
speed, reduce downtime, and improve customer satisfaction.
38. What is the
purpose of a Design Document in .NET?
A Design Document is a document in .NET
that describes the architecture, design, and implementation of a software
system, which helps to communicate ideas, clarify requirements, and guide
development.
39. What is the
purpose of a Technical Specification in .NET?
A Technical Specification is a document
in .NET that specifies the technical requirements, standards, and guidelines
for a software system, which helps to ensure consistency, compatibility, and
quality.
40. What is the
purpose of a Test Plan in .NET?
A Test Plan is a document in .NET that
describes the approach, scope, and criteria for testing a software system,
which helps to ensure that the system meets the requirements, performs as
expected, and is reliable.
41. What is the
purpose of a Code Review Checklist in .NET?
A Code Review Checklist is a document in
.NET that lists the common issues, best practices, and standards to review
during a code review, which helps to ensure consistency, quality, and
maintainability.
42. What is the
difference between Unit Testing and Integration Testing?
Unit Testing is a type of testing in
.NET that tests individual units of code in isolation, while Integration
Testing is a type of testing in .NET that tests the interactions between
different units of code or between different systems.
43. What is the
purpose of Load Testing in .NET?
Load Testing is a type of testing in
.NET that involves simulating high loads and traffic on a software system to
measure its performance, scalability, and reliability under stress.
44. What is the
purpose of Security Testing in .NET?
Security Testing is a type of testing in
.NET that involves identifying and mitigating security risks and
vulnerabilities in a software system, which helps to prevent data breaches,
hacking, or unauthorized access.
45. What is the
purpose of Performance Testing in .NET?
Performance Testing is a type of testing
in .NET that involves measuring and optimizing the performance and speed of a
software system, which helps to ensure that the system meets the performance
requirements and user expectations.
46. What is the
difference between Debugging and Testing in .NET?
Debugging is a process in .NET that
involves identifying and fixing defects in a software system during
development, while Testing is a process in .NET that involves verifying and
validating the functionality, quality, and performance of a software system
before and after deployment.
47. What is the
difference between Build and Release in .NET?
Build is a process in .NET that involves
compiling, linking, and packaging the source code into a deployable format,
while Release is a process in .NET that involves deploying, configuring, and
testing the software system in a production environment.
48. What is the
purpose of a Bug Report in .NET?
A Bug Report is a document in .NET that
describes a defect or issue found in a software system, which helps to track,
prioritize, and resolve the problem.
49. What is the
difference between .NET Framework and .NET Core?
.NET Framework is a proprietary software
framework in .NET that supports Windows-based applications and runs only on the
Windows operating system, while .NET Core is an open-source software framework
in .NET that supports cross-platform applications and runs on Windows, Linux,
and macOS. Additionally, .NET Core is designed to be lightweight, modular, and
scalable compared to the more comprehensive .NET Framework.
Comments
Post a Comment