.NET Software Developer

30+ .NET Software Developer Interview Questions and Answers

Updated 29 Jun 2025
search-icon

Q. Can a sealed class inherit from a non-sealed class?

Ans.

No, a sealed class cannot inherit a non-sealed class.

  • A sealed class is a class that cannot be inherited.

  • A non-sealed class can be inherited by other classes.

  • Inheritance is not possible from a non-sealed class to a sealed class.

Q. Can an abstract class inherit from a non-abstract class?

Ans.

No

  • An abstract class cannot inherit a non-abstract class.

  • An abstract class can only be inherited by other classes or abstract classes.

  • A non-abstract class can be inherited by both abstract and non-abstract classes.

.NET Software Developer Interview Questions and Answers for Freshers

illustration image

Asked in MNC Group

6d ago

Q. What is .net? What is boxing , unboxing? Wha is constraints ? Explain oops?

Ans.

.NET is a software framework developed by Microsoft. Boxing and unboxing are operations to convert value types to reference types and vice versa.

  • Boxing is the process of converting a value type to an object type, which involves creating a new object on the heap and copying the value into it.

  • Unboxing is the process of extracting the value type from an object type, which involves casting the object to the appropriate value type and copying the value back to the stack.

  • Constraint...read more

Asked in Chetu

6d ago

Q. What is oops. What is .net core What is Mssql. What is joins. What is union. What is procedures

Ans.

Answers to common technical questions asked in a .NET Software Developer interview.

  • OOPs stands for Object-Oriented Programming, a programming paradigm that uses objects to represent real-world entities.

  • .NET Core is a cross-platform, open-source framework for building modern applications.

  • MS SQL is a relational database management system used to store and retrieve data.

  • Joins are used to combine data from two or more tables based on a related column.

  • Union is used to combine the ...read more

Are these interview questions helpful?

Q. Why is an abstract class called an abstract class?

Ans.

An abstract class is called so because it cannot be instantiated and can only be used as a base for other classes.

  • An abstract class is designed to be inherited by other classes.

  • It provides a common interface and functionality that derived classes can implement or override.

  • An abstract class can have both abstract and non-abstract methods.

  • It can also have abstract properties and events.

  • Example: The System.IO.Stream class in .NET is an abstract class that provides a common inter...read more

Asked in BUSINESSNEXT

1d ago

Q. Difference in Webservices and WCF, Abstraction and its types, Boxing and Unboxing

Ans.

Webservices and WCF are both used for communication between applications. Abstraction is a concept in programming. Boxing and unboxing are operations in .NET.

  • Webservices and WCF are both used for communication between applications, but WCF provides more advanced features like message queuing and reliable sessions.

  • Abstraction is a concept in programming that allows us to hide complex implementation details and only expose the necessary functionality.

  • There are two types of abst...read more

.NET Software Developer Jobs

Infosys logo
.NET Software Developer @ Infosys-PAN INDIA 3-8 years
Infosys
3.6
Pune
Infosys logo
.NET Software Developer @ Infosys-Pan India(N) 3-8 years
Infosys
3.6
Bangalore / Bengaluru
Infosys logo
.NET Software Developer 3-8 years
Infosys
3.6
Ahmedabad

Q. Can a sealed class inherit from an abstract class?

Ans.

No, a sealed class cannot inherit an abstract class.

  • A sealed class is a class that cannot be inherited.

  • An abstract class is a class that cannot be instantiated and is meant to be inherited by other classes.

  • Since a sealed class cannot be inherited, it cannot inherit an abstract class.

6d ago

Q. Create a login form and store the values in a database.

Ans.

Create a login form and store values in a database.

  • Create a form with input fields for username and password

  • Use a server-side language like C# to handle form submission

  • Hash and salt the password before storing it in the database

  • Use SQL to insert the username and hashed password into the database

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Asked in UnifyCloud

2d ago

Q. What is dependency injection and middleware.

Ans.

Dependency injection is a design pattern used to remove hard-coded dependencies and make components more modular. Middleware is software that acts as a bridge between an operating system or database and applications, handling requests and responses.

  • Dependency injection allows for the injection of dependencies into a class or method from an external source, making the code more flexible and testable.

  • Middleware in .NET can be used to handle cross-cutting concerns such as loggin...read more

Asked in BUSINESSNEXT

4d ago

Q. Which protocol is used to implement REST?

Ans.

REST is primarily implemented using the HTTP protocol, enabling stateless communication between clients and servers.

  • REST stands for Representational State Transfer.

  • It uses standard HTTP methods like GET, POST, PUT, DELETE.

  • For example, a GET request retrieves data from a server.

  • RESTful APIs are commonly used in web services and applications.

  • They can return data in formats like JSON or XML.

Asked in Sun Fusion

3d ago

Q. Explain OOPS concepts with a real-time example.

Ans.

OOPs is a programming paradigm based on the concept of objects. Real-time example is a car.

  • OOPs stands for Object-Oriented Programming

  • It focuses on creating objects that interact with each other to solve a problem

  • Real-time example: A car is an object that has properties like color, model, and methods like start, stop, accelerate

Asked in ApexPath

5d ago

Q. Create a .NET Core project and share your screen.

Ans.

Guide to creating a simple .NET Core web application using ASP.NET Core.

  • 1. Open Visual Studio and select 'Create a new project'.

  • 2. Choose 'ASP.NET Core Web Application' template.

  • 3. Select the project type (e.g., Web Application, API).

  • 4. Configure project settings (name, location, framework version).

  • 5. Click 'Create' to generate the project structure.

  • 6. Implement a simple controller and view for demonstration.

5d ago

Q. What is boxing and unboxing?

Ans.

Boxing is the process of converting a value type to a reference type, while unboxing is the reverse process.

  • Boxing is done implicitly when a value type is assigned to an object reference.

  • Unboxing is done explicitly by casting the object reference back to the value type.

  • Boxing and unboxing can cause performance issues and should be used sparingly.

Asked in Trianz

1d ago

Q. How does authentication work for a web API?

Ans.

Authentication for web API involves verifying the identity of users before granting access to resources.

  • Authentication can be done using tokens like JWT or OAuth.

  • API endpoints can be secured using authentication middleware.

  • User credentials are validated against a data store like a database.

  • Authentication headers like Authorization are used to send tokens with requests.

Q. types of join, Storeprocedure , Subquery

Ans.

Question about types of join, stored procedures, and subqueries.

  • Types of join include inner join, left join, right join, and full outer join.

  • Stored procedures are precompiled SQL statements that can be executed with parameters.

  • Subqueries are queries nested within another query and can be used to retrieve data for comparison or filtering.

Q. Creating a employee details form in asp. Net

Ans.

Creating an employee details form in ASP.NET

  • Use ASP.NET Web Forms or MVC framework to create the form

  • Include fields for employee name, address, contact information, job title, etc.

  • Use validation controls to ensure data entered is accurate

  • Store employee details in a database for future reference

Q. Explain company policy, and some other things

Ans.

Company policy is a set of rules and guidelines that employees must follow in the workplace.

  • Company policy outlines acceptable behavior and expectations for employees.

  • It covers areas such as dress code, attendance, communication, and use of company resources.

  • Employees are expected to adhere to company policy to maintain a positive work environment.

  • Violation of company policy can result in disciplinary action, up to and including termination.

Asked in UnifyCloud

4d ago

Q. What is routing and API?

Ans.

Routing is the process of directing incoming requests to the appropriate controller and action in an MVC application. APIs are endpoints that allow communication between different software applications.

  • Routing in .NET helps map URLs to specific controller actions in an MVC application.

  • APIs in .NET are used to expose functionalities and data to be consumed by other software applications.

  • Routing and APIs are essential components for building web applications in .NET.

Asked in MNC Group

5d ago

Q. Explain SQL? What is database?

Ans.

SQL is a programming language used to manage and manipulate relational databases.

  • SQL stands for Structured Query Language

  • It is used to create, modify, and query databases

  • Common SQL commands include SELECT, INSERT, UPDATE, and DELETE

  • SQL is used in many popular database management systems such as MySQL, Oracle, and Microsoft SQL Server

Q. Create a function in .NET with CRUD operations.

Ans.

A function in .NET with CRUD operations.

  • Create a class with methods for each CRUD operation

  • Use ADO.NET or Entity Framework for database access

  • Handle exceptions and validate input

  • Example: public class Customer { Create(), Read(), Update(), Delete() }

  • Example: using (var context = new DbContext()) { context.Customers.Add(customer); context.SaveChanges(); }

Asked in Trianz

5d ago

Q. How do you configure DI services?

Ans.

DI services can be configured in .NET by registering services in ConfigureServices method of Startup class

  • Register services using AddTransient, AddScoped, or AddSingleton methods

  • Use IServiceCollection interface to add services

  • Example: services.AddTransient<IMyService, MyService>()

Asked in BUSINESSNEXT

2d ago

Q. Write SQL queries using joins.

Ans.

The candidate is asked to write queries and joins.

  • Understand the requirements and constraints of the query

  • Identify the tables and columns needed for the query

  • Write the query using appropriate syntax and functions

  • Use joins to combine data from multiple tables

  • Test the query to ensure it returns the expected results

Asked in BUSINESSNEXT

5d ago

Q. Caching and its types

Ans.

Caching is a technique to store frequently accessed data in a temporary storage to improve performance.

  • Caching improves application performance by reducing the need to fetch data from the original source.

  • Types of caching include in-memory caching, database caching, and distributed caching.

  • In-memory caching stores data in the application's memory for quick access.

  • Database caching stores frequently accessed data in a separate cache database.

  • Distributed caching distributes the c...read more

Asked in Infosys

3d ago

Q. What are the core concepts of Object-Oriented Programming (OOP)?

Ans.

OOPs concepts are fundamental principles of object-oriented programming that help in organizing and designing code.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (class).

  • Inheritance: Ability of a class to inherit properties and behavior from another class.

  • Polymorphism: Ability to present the same interface for different data types.

  • Abstraction: Hiding the complex implementation details and showing only the necessary features of an object.

Asked in TCS

2d ago

Q. What is a stored procedure?

Ans.

Stored procedure is a precompiled SQL query that is stored in the database for reuse.

  • Stored procedures improve performance by reducing network traffic and increasing security.

  • They can accept parameters and return results like a regular SQL query.

  • Stored procedures can be called from application code to execute complex logic on the database server.

  • Examples: sp_GetCustomerById, sp_InsertOrder

Asked in TCS

3d ago

Q. Types of joins. Stored procedure

Ans.

Types of joins in SQL are inner join, left join, right join, and full outer join. Stored procedures are precompiled SQL queries stored in the database for reuse.

  • Inner join: Returns rows when there is at least one match in both tables.

  • Left join: Returns all rows from the left table and the matched rows from the right table.

  • Right join: Returns all rows from the right table and the matched rows from the left table.

  • Full outer join: Returns rows when there is a match in one of the...read more

Asked in Trianz

3d ago

Q. How do you handle CORS?

Ans.

CORS can be handled by configuring the server to allow cross-origin requests from specified origins.

  • Configure server to include appropriate CORS headers like Access-Control-Allow-Origin

  • Use middleware or filters to handle CORS in .NET applications

  • Consider security implications when allowing cross-origin requests

Q. What is C# and .net

Ans.

C# is a programming language developed by Microsoft for building applications on the .NET framework.

  • C# is a modern, object-oriented language with similarities to Java.

  • .NET is a software framework developed by Microsoft for building and running applications.

  • C# and .NET are commonly used for developing web applications, desktop applications, and mobile apps.

  • C# code is compiled into Intermediate Language (IL) which runs on the Common Language Runtime (CLR) in the .NET framework.

Q. How do you connect to databases using .NET?

Ans.

Connecting to databases in .NET involves using ADO.NET, Entity Framework, or other ORM tools for data access.

  • Use ADO.NET for direct database connections: Example - SqlConnection, SqlCommand.

  • Entity Framework simplifies data access with LINQ: Example - DbContext, DbSet.

  • Connection strings are essential for database connectivity: Example - 'Server=myServer;Database=myDB;User Id=myUser;Password=myPass;'

  • Use asynchronous methods for better performance: Example - await dbContext.Save...read more

Asked in Trianz

3d ago

Q. Middleware in .Net core

Ans.

Middleware in .NET Core is a component that can handle requests and responses in the application pipeline.

  • Middleware is a piece of software that can intercept and process HTTP requests and responses.

  • Middleware components are added to the application pipeline in the Startup class.

  • Middleware can perform tasks such as authentication, logging, error handling, etc.

  • Example: UseMiddleware<CustomMiddleware>()

1
2
Next

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Infosys Logo
3.6
 • 7.9k Interviews
Wipro Logo
3.7
 • 6.1k Interviews
Capgemini Logo
3.7
 • 5.1k Interviews
IBM Logo
4.0
 • 2.5k Interviews
View all

Top Interview Questions for .NET Software Developer Related Skills

interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

.NET Software Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits