DOT NET Developer
600+ DOT NET Developer Interview Questions and Answers

Asked in Colan Infotech

Q. write a program to print ***** (n=5) and next line 4*, then 3*... I did all theoretical questions well, but didnt complete this program, and in 5 minutes, he took the laptop and asked be to go back.
Program to print decreasing number of asterisks in each line
Create a loop to iterate from n to 1
In each iteration, print the corresponding number of asterisks
Use a nested loop to print the asterisks in each line

Asked in Clarion Technologies

Q. How do you create automated jobs in an application?
Automated jobs can be created using scheduling tools or by writing custom code to run at specific intervals.
Use scheduling tools like Windows Task Scheduler or Cron to run jobs at specific intervals
Write custom code using libraries like Quartz.NET or Hangfire to schedule and run jobs
Jobs can perform tasks like data backups, sending emails, or running reports

Asked in Infosys

Q. Write a LINQ query to fetch data from the 'students' database table, ordering the data by 'studentID' in ascending order.
Use LINQ to fetch data from the 'students' table in ascending order of 'studentid'.
Use LINQ query syntax or method syntax to retrieve data from the 'students' table.
Order the data by 'studentid' in ascending order using the 'OrderBy' or 'OrderByDescending' method.
Ensure that the LINQ query is executed against the database to fetch the data.

Asked in Libit Solutions

Q. What are the SQL queries to delete and update records based on specific conditions?
SQL queries for deleting and updating records based on specific conditions
For deleting records based on specific conditions: DELETE FROM table_name WHERE condition;
For updating records based on specific conditions: UPDATE table_name SET column1 = value1, column2 = value2 WHERE condition;

Asked in TCS

Q. What is the SQL query to find the second highest salary from the employee table? What is the difference between the primary key and unique key?
To find the second highest salary, use SQL queries with subqueries or the DISTINCT keyword for unique values.
Using Subquery: SELECT MAX(salary) FROM employee WHERE salary < (SELECT MAX(salary) FROM employee);
Using DISTINCT: SELECT DISTINCT salary FROM employee ORDER BY salary DESC LIMIT 1 OFFSET 1;
Handles Ties: Both methods consider ties, ensuring the second highest unique salary is returned.
Performance: The choice of method may affect performance based on the size of the emp...read more

Asked in Excellon Software

Q. How do you find the names of employees with the second highest salary in an Employee table?
Use SQL query to find the second highest salary employee names in Employee table.
Use ORDER BY clause to sort the salaries in descending order.
Use LIMIT 1 OFFSET 1 to get the second highest salary.
Join the Employee table with itself to get the employee names corresponding to the second highest salary.
DOT NET Developer Jobs



Asked in Manabh Software Solutions

Q. How would you simplify mathematical expressions like (a+b)^2?
The expression (a+b)² can be simplified using the binomial theorem to a² + 2ab + b².
Use the formula (x+y)² = x² + 2xy + y².
For (a+b)², set x = a and y = b.
Result: (a+b)² = a² + 2ab + b².
Example: If a=2 and b=3, then (2+3)² = 25, which equals 2² + 2*2*3 + 3².

Asked in Infosys

Q. what is application pool,what is IIS,how to host app in dev env,abstarction vs encapsulation,how to optimize databse to improve performance,where to start check is application crashses
Application pool is a group of one or more worker processes, IIS is a web server, hosting app in dev env involves setting up IIS, abstraction focuses on hiding implementation details, encapsulation bundles data and methods together, optimizing database involves indexing and query optimization, check for application crashes in event logs or monitoring tools.
Application pool is a group of one or more worker processes that share the same configuration and application boundaries....read more
Share interview questions and help millions of jobseekers 🌟

Asked in Excellon Software

Q. What is MVC? What is MVC page Life Cycle?
MVC stands for Model-View-Controller. It is a software architectural pattern for implementing user interfaces.
MVC separates the application into three main components: Model (data), View (UI), and Controller (logic)
MVC page life cycle involves the following stages: Routing, Controller Initialization, Action Execution, Result Execution, and Rendering
Asked in Yovant

Q. What is the difference between VB.Net and MVC?
VB.Net is a programming language while MVC is a design pattern for organizing code in web applications.
VB.Net is a programming language used for developing applications, while MVC is a design pattern used for organizing code in web applications.
VB.Net is a part of the .NET framework, whereas MVC is a design pattern that separates an application into three main components: Model, View, and Controller.
VB.Net can be used with or without the MVC pattern, depending on the project ...read more

Asked in TCS

Q. Where do we store the configuration in the application?
Configuration settings can be stored in various places such as appsettings.json, environment variables, database, or Azure Key Vault.
appsettings.json file in ASP.NET Core projects
Environment variables for sensitive data
Database for dynamic configuration
Azure Key Vault for secure storage

Asked in Synechron

Q. Using NGRX state management, how do you manage state in your current project?
I use Ngrx for state management in my current project by defining actions, reducers, effects, and selectors.
Define actions to describe user events or interactions
Create reducers to specify how state should change in response to actions
Implement effects to manage side effects like API calls
Use selectors to retrieve specific pieces of state for components

Asked in FIS

Q. What is inheritance and Examples in inheritance.
Inheritance is a mechanism in object-oriented programming where a class is based on another class.
Inheritance allows a subclass to inherit properties and methods from a superclass.
The subclass can also add its own properties and methods.
Examples include a Car class inheriting from a Vehicle class, or a Dog class inheriting from an Animal class.

Asked in EPAM Systems

Q. Can you write a program that takes the input "aabbccaaa" and produces the output "2a2b2c3a"?
Yes, a program can be written to convert 'aabbccaaa' to '2a2b2c3a'.
Create a function that iterates through the input string and counts the consecutive characters.
Store the count and character in a new string as needed.
Return the final output string.

Asked in Sensiple

Q. What are design patterns in Dot net, How to handle multiple request at same time?
Design patterns in Dot net are reusable solutions to common problems in software design. To handle multiple requests at the same time, we can use asynchronous programming and multithreading.
Design patterns in Dot net include Singleton, Factory, Observer, and more.
To handle multiple requests at the same time, we can use asynchronous programming with async/await keywords.
Another approach is to use multithreading to process multiple requests concurrently.
Using Task Parallel Libr...read more

Asked in Infosys

Q. What are the characteristics of the singleton pattern and how do you use it?
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Characteristics include private constructor, static instance variable, static method to access instance, lazy initialization, and thread safety.
Example: public class Singleton { private static Singleton instance; private Singleton() {} public static Singleton getInstance() { if (instance == null) { instance = new Singleton(); } return instance; }}

Asked in Infosys

Q. What is the function of an object?
The function of an object is to store data and behavior related to a specific entity in a program.
Objects store data in the form of properties
Objects can have methods which define behavior
Objects can be used to model real-world entities like cars, employees, etc.
Objects can be instantiated from classes or created dynamically

Asked in Sdaemon Infotech

Q. Can a table have multiple primary keys?
Yes, a table can have multiple primary keys.
A table can have a composite primary key, which consists of multiple columns.
Each column in the composite primary key contributes to uniquely identifying each row.
Example: CREATE TABLE Employee (emp_id INT, dept_id INT, PRIMARY KEY (emp_id, dept_id));

Asked in NeoSOFT

Q. What is the difference between Unique and Primary Key constraints? What is the difference between Clustered and Non-Clustered Indices?
Unique, Primary Key, Clustered, and Non-Clustered Indices are all used in database management to enforce data integrity and improve query performance.
Unique constraint ensures that all values in a column are unique, but allows NULL values.
Primary Key constraint ensures that all values in a column are unique and not NULL. Each table can have only one Primary Key.
Clustered Index physically reorders the way records in the table are stored. Each table can have only one Clustered ...read more

Asked in EbixCash Limited

Q. Examples of Server side session Management? Types of Session State?
Server side session management involves storing user data on the server to maintain state. Types include in-process, out-of-process, and database.
In-process session state: Data stored in memory on the same server as the application.
Out-of-process session state: Data stored in a separate server or service, such as a state server or Redis cache.
Database session state: Data stored in a database, such as SQL Server or MySQL.
Examples: ASP.NET session state, PHP session management,...read more

Asked in Zobi Web Solutions

Q. Can a class simultaneously inherit from an interface and an abstract class, and if so, what is the correct order for this inheritance?
Yes, a class can inherit from both an interface and an abstract class, with the correct order being abstract class first, then interface.
A class can inherit from one abstract class and multiple interfaces in C#.
The syntax for inheritance is: 'class ClassName : AbstractClass, IInterface'.
Example: 'class MyClass : MyAbstractClass, IMyInterface'.
Abstract classes can provide default implementations, while interfaces define contracts.
C# allows multiple interface inheritance but on...read more
Asked in EBSolute Technologies

Q. Rownumber and partition by in sql or how to find duplicate in table .
ROW_NUMBER() and PARTITION BY are used in SQL to assign a unique row number to each row within a partition.
Use ROW_NUMBER() function along with PARTITION BY clause to assign a unique row number to each row within a partition.
To find duplicates in a table, you can use a combination of ROW_NUMBER() and PARTITION BY to identify rows with row numbers greater than 1.
Example: SELECT * FROM (SELECT *, ROW_NUMBER() OVER(PARTITION BY column_name ORDER BY column_name) AS row_num FROM t...read more
Asked in MPRDC

Q. What is the difference between .NET Framework and .NET Core Framework?
The .NET Framework is a Windows-only framework, while .NET Core is cross-platform and open-source.
The .NET Framework is a Windows-only framework, while .NET Core is cross-platform and open-source.
.NET Framework is a mature framework with a large number of libraries, while .NET Core is a lightweight framework with fewer libraries.
.NET Framework requires Windows to run, while .NET Core can run on Windows, Linux, and macOS.
The .NET Framework is not open-source, while .NET Core i...read more

Asked in Omnicom Media Group

Q. What is the difference between UNION and UNION ALL in SQL?
Union combines and removes duplicates, Union All combines all rows including duplicates.
Union merges the results of two or more SELECT statements into a single result set.
Union All returns all rows from all SELECT statements, including duplicates.
Union requires the same number of columns in all SELECT statements, while Union All does not.
Union sorts the result set and removes duplicates, while Union All does not.
Union is slower than Union All because it performs additional pr...read more
Asked in Grid Dynamics

Q. How can you set authorization and authentication in Web API?
Authorization and authentication in web API can be set using various methods like JWT, OAuth, and Identity Framework.
Use JWT (JSON Web Tokens) for token-based authentication
Implement OAuth for secure authorization and authentication
Utilize Identity Framework for managing user authentication and authorization
Set up roles and policies to control access to resources

Asked in Planetcast

Q. What is the difference between IEnumerable and IQueryable?
IEnumerable is used for in-memory collection operations, while IQueryable is used for database query operations.
IEnumerable is used for querying data from in-memory collections like arrays, lists, etc.
IQueryable is used for querying data from a database using LINQ to SQL or Entity Framework.
IEnumerable executes the query in-memory, while IQueryable executes the query on the database server.
IEnumerable is suitable for LINQ to Objects, while IQueryable is suitable for LINQ to E...read more
Asked in BizTranSights Solutions

Q. If we truncate a table, will the new row start from 1 or continue from the previous value?
The new row will start from 1 after truncating a table.
Truncating a table removes all rows from the table, resetting the row count to 1.
The next row inserted after truncation will have an ID of 1.
Truncating a table does not reset the auto-increment value of the primary key column.

Asked in CGI Group

Q. Type of data,garbage collector etc What kind of project have you done before
I have worked on various projects including web applications, desktop applications, and mobile applications.
Developed a web application using ASP.NET MVC and Entity Framework
Created a desktop application using WPF and MVVM pattern
Built a mobile application using Xamarin.Forms
Used garbage collector to manage memory in all projects
Handled different types of data such as text, images, and videos

Asked in Topia Life Sciences

Q. What is the difference between IEnumerable, IQueryable, and List in .NET? When would you use each one?
IEnumerable, IQueryable, and List are collections in .NET with different use cases and performance characteristics.
IEnumerable: Represents a forward-only cursor for iterating over a collection. Example: IEnumerable<int> numbers = new List<int> { 1, 2, 3 };
IQueryable: Designed for querying data from a data source, allowing for LINQ queries to be translated to SQL. Example: IQueryable<Customer> customers = dbContext.Customers;
List: A concrete collection that provides methods fo...read more

Asked in Sensiple

Q. What are filters , Routing and caching in MVC? , How to achieve Authorization in API?
Filters, routing, and caching are important concepts in MVC. Authorization in API can be achieved using authentication mechanisms.
Filters in MVC are used to perform logic before or after an action method is executed.
Routing in MVC is used to map URLs to controller actions.
Caching in MVC is used to store data temporarily to improve performance.
Authorization in API can be achieved using authentication mechanisms like JWT tokens or OAuth.
Example: Using [Authorize] attribute in A...read more
Interview Questions of Similar Designations
Interview Experiences of Popular Companies





Top Interview Questions for DOT NET Developer Related Skills

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


Reviews
Interviews
Salaries
Users

