What Is A Delegate
It is the definition of a method that encapsulates certain arguments and types of return. It allows passing a method as an argument of a function, as long as it matches its specific signature.
var fileDownloader = new FileDownloader fileDownloader.DownloadFile void PrintDownloadCompletedpublic class FileDownloader}
Is Aspnet Different From Asp If Yes Explain How
Yes, ASP.NET and ASP both are different. Lets check how they are different from each other.
- ASP.NET uses .NET languages such as C# and VB.NET, which are compiled to Microsoft Intermediate Language . ASP uses VBScript. ASP code is interpreted during the execution.
- ASP.NET which is developed by Microsoft is used to create dynamic web applications while ASP is Microsofts server-side technology used to create web pages.
- ASP.NET is fully object-oriented but ASP is partially object-oriented.
- ASP.NET has full XML Support for easy data exchange whereas ASP has no built-in support for XML.
- ASP.NET uses the ADO.NET technology to connect and work with databases. ASP uses ADO technology.
What Are The Different Types Of Control Statements In C#
Sample answer:
There are generally considered to be three main types of control statements, each serving different purposes. These include:
Don’t Miss: What Color Is Best For An Interview
What Is The Difference Between Iapplicationbuilderuse And Iapplicationbuilderrun
We can use both the methods in Configure methods of the startup class. Both are used to add middleware delegates to the application request pipeline. The middleware adds using IApplicationBuilder.Use may call the next middleware in the pipeline whereas the middleware adds using IApplicationBuilder.The run method never calls the subsequent middleware. After IApplicationBuilder.Run method, system stop adding middleware in the request pipeline.
How Does Linq Work
![PHP [Logical] Interview Questions and Answers For 1,2,3,5 Year ... PHP [Logical] Interview Questions and Answers For 1,2,3,5 Year ...](https://www.interviewprotips.com/wp-content/uploads/php-logical-interview-questions-and-answers-for-1235-year.jpeg)
Internally build the correct query or generate the corresponding operations on the collections or parse the XML and returns the relevant data. It encapsulates all these behaviors and provides a single implementation. In this way, we can use the same queries, and the same language, independently of the underlying data source.
Recommended Reading: How To Interview Someone For A Job Questions
How To Nail Your Next Tech Interview
Prepare the most anticipated C# interview questions and answers for experienced professionals to increase your chances of landing a job at the top companies that use C# in their tech stacks, such as Accenture, Google, Delivery Hero, Wipro, Infosys, HCL, TCs, Microsoft, Stack Overflow, Intuit, and Trustpilot.
C# is a programming language ideal for general purposes as it encompasses several disciplines such as object-oriented programming, component-oriented programming, static and strong typing. C# is popularly used in the ASP.NET framework as it is ideal for creating web applications, websites, and games. Continue reading to discover the most frequently asked C# interview questions and answers for experienced professionals.
If you are a software engineer, software developer, engineering manager, or tech lead, check out our technical interview checklist, interview questions page, and salary negotiation ebook to get interview-ready!
Having trained over 11,000 software engineers, we know what it takes to crack the toughest tech interviews. Our alums consistently land offers from FAANG+ companies. The highest ever offer received by an IK alum is a whopping $1.267 Million!
At IK, you get the unique opportunity to learn from expert instructors who are hiring managers and tech leads at Google, Facebook, Apple, and other top Silicon Valley tech companies.
Want to nail your next tech interview? Sign up for our FREE Webinar.
Here’s what we’ll cover:
Explain About Major Components Of The Net Framework
The major components .NET framework are given below:
- Common Language Runtime:
- It is an execution engine that runs the code and provides services that make the development process easier.
- Services provided by CLR are memory management, garbage collection, type safety, exception handling, security, and thread management. It also makes it easier for designing the applications and components whose objects interact across the languages.
- The programs written for the .NET Framework are executed by the CLR regardless of programming language. Every .NET Framework version is having CLR.
Also Check: Is Grokking The System Design Interview Worth It
A Comprehensive List Of Dot Net Interview Questions And Answers
.Net is one of the most widely used frameworks for developing applications on windows, so we know hiring Dot NET developers is not easy. It encompasses ASP .Net and languages such as VB .Net, C#, Cobol, Perl, and more. Designed by Microsoft and its community, this open-source framework effortlessly combines MVC structure and Web API into a powerful tool and enables developers to create reliable and responsive websites.
As an interviewer hiring for .Net developers, there are hundreds of Dot NET interview questions that you could ask to determine a candidates fit for .NET related position. The key characteristics of a good candidate include a high skill level and an in-depth understanding of various essential and advanced development concepts.
The .Net interview questions listed below give a good primer for screening candidates working in the .NET framework. That being said, it is important to remember that this list will just get you started. Depending on the specific job offer and related tasks, you can identify and ask the best Dot Net interview questions and answers.
For the ease of taking interviews, we are segregating them into 3 different categories as
Q5 Define The Console Application
Answer: The console application is an application that takes inputs and displays output at the command prompt in Windows with the access of three basic streams, i.e., standard input, standard output, and standard error. For any beginner on C#, building a console application is ideally the first step, to begin with.
Don’t Miss: How To Reduce Bias In Interviews
What Are The Different Types Of Jit Compilers
Ans: There are 3 types of JIT Compilers:
i. Pre-JIT compiler: It compiles all the source code into the machine code in a single compilation cycle, i.e. at the application deployment time.
ii. Normal JIT Compiler: The source code methods required at run-time are compiled into machine code and stored in the cache to be called later.
iii. Econo JIT Compiler: The methods required only at run-time are compiled using this compiler and they are not stored for future use.
What Is The Difference Between A Function And A Stored Procedure In Net
Function | |
Can only return one value | Can return any number of values |
No support for exception handling using try-catch blocks | Supports the usage of try-catch blocks for exception handling |
The argument consists of only one input parameter | Both input and output parameters are present |
A function can be called from a stored procedure | The stored procedure cannot be called from a function |
You May Like: What Is The Star Method Interview
What Is Middleware In Net Core
- Middleware is software assembled into an application pipeline for request and response handling. Each component will choose whether the request should be passed to the next component within the pipeline, also it can carry out work before and after the next component within the pipeline.
- For example, we can have a middleware component for user authentication, another middleware for handling errors, and one more middleware for serving static files like JavaScript files, images, CSS files, etc.
- It can be built-in into the .NET Core framework, which can be added through NuGet packages. These middleware components are built as part of the configure methods application startup class. In the ASP.NET Core application, these Configure methods will set up a request processing pipeline. It contains a sequence of request delegates that are called one after another.
- Normally, each middleware will handle the incoming requests and passes the response to the next middleware for processing. A middleware component can take the decision of not calling the next middleware in the pipeline. This process is known as short-circuiting the pipeline or terminating the request pipeline. This process is very helpful as it avoids unnecessary work. For example, if the request is made for a static file such as a CSS file, image, or JavaScript file, etc., these static files middleware can process and serve the request and thus short-circuit the remaining pipeline.
What Are Exe And Dll

This is an example of one of the most basic senior .NET developer interview questions, so keep the answer in mind.
You May Like: What Is Pi Test In Interview
What Is The Net Framework And How Does It Work
It is a virtual machine that executes a managed code. The code is compiled from C# or VB .NET and is executed by the CLR .
Its working is as follows:
- You create a program in C # or VB.Net and compile it. The code is then translated to CIL .
- The program is assembled into bytecode to generate a CLI assembly file of.exe or .dll format.
- When you run the program , it is executed by the .Net framework CLR . Since the code isnt directly run by the operating system, it is called Managed Code.
- The .Net Framework CLR, through the JIT Compiler, is responsible for compiling this code managed in the intermediate language. The compiled code is then sent to the native machine language assembler for the CPU to execute it.
The CIL is the language that understands the.Net Framework.
- C # and VB .Net are languages that we understand as humans.
- C # and VB .Net are translated to CIL.
Take care to remember the details. It may look like basic information, but it is among recruiters top senior .NET developer interview questions.
Explain The Differences Between Value Type And Reference Type
The main differences between value type and reference type are given below:
- A Value Type holds the actual data directly within the memory location and a reference type contains a pointer which consists of the address of another memory location that holds the actual data.
- Value type stores its contents on the stack memory and reference type stores its contents on the heap memory.
- Assigning a value type variable to another variable will copy the value directly and assigning a reference variable to another doesnt copy the value, instead, it creates a second copy of the reference.
- Predefined data types, structures, enums are examples of value types. Classes, Objects, Arrays, Indexers, Interfaces, etc are examples of reference types.
Also Check: What Makes A Good Manager Interview Question
What Is Response Caching In Net Core
During response caching, cache-related headers are mentioned in the HTTP responses of .NET Core MVC actions. Using these headers, we can specify how the client/proxy machine will cache responses to requests. This, in turn, reduces the number of client/proxy requests to the web server because the responses are sent from the cache itself.
As we can see in the below diagram, the first request has a complete cycle from client browser to proxy server and then subsequently to web server. Now, the proxy server has stored the response in the cache. For all the subsequent requests, the proxy server sends the response from the cache itself. Hence, the number of proxy/client requests to the web server is reduced.
Question : Is There A Difference Between A Stack And A Queue
Yes. A very short and clear way to explain this would be to say that stacks are LIFO, and queues are FIFO.
LIFO means Last in, first-out. Stacks process value types by a top-down hierarchy. On the flip side, FIFO means First in, first-out. Queues follow this principle and insert items from the lower end while deleting ones from the top.
You May Like: How To Prepare For A Kindergarten Teaching Interview
How To Enable Session In Aspnet Core
The middleware for the session is provided by the package Microsoft.AspNetCore.Session. To use the session in the ASP.NET Core application, we need to add this package to the csproj file and add the Session middleware to the ASP.NET Core request pipeline.
public class Startup public void Configure }
What Is Object Pooling
Ans: Object Pooling is a concept for optimal use of limited resources through software constructs. The ready-to-use objects, connections, and threads are stored in a pool of objects in memory for later use. For creating a new object, it is pulled from the pool and allocated for the request. Pooling helps in improving performance and facilitates scalability.
Read Also: How To Transcribe Interviews For Research
How Is A Managed Code Executed
Ans: The steps for executing a managed code are as follows:
- Choose a language compiler depending on the language of the code.
- Convert the code into Intermediate language using its own compiler.
- The IL is then targeted to CLR which converts the code into native code using JIT.
- Execution of Native code.
How Are User Controls Created In C#

Sample answer:
In C#, user controls allow developers to write code that can be used in various areas of the program.
For example, if a website requires the same search control in multiple places, it can be created once as a user control and then dropped into different areas of the code. This serves the dual purposes of reusability and bug prevention.
Read Also: What Is An Informational Interview
Net Technical Interview Questions
Q9 What Is Cross Page Posting How Is It Done
Ans: By default, ASP.NET submits a form to the same page. In cross-page posting, the form is submitted to a different page. This is done by setting the PostBackUrl property of the button to the desired page. In the code-behind of the page to which the form has been posted, use the FindControlmethod of the PreviousPage property to reference the data of the control in the first page.
Don’t Miss: What Are Some Good Responses To Interview Questions
What Are Custom Control And User Control
Custom Controls are controls generated as compiled code , those are easier to use and can be added to toolbox. Developers can drag and drop controls to their web forms. Attributes can, at design time. We can easily add custom controls to Multiple Applications . So, If they are private, then we can copy to dll to bin directory of web application and then add reference and can use them.
User Controls are very much similar to ASP include files, and are easy to create. User controls cant be placed in the toolbox and dragged dropped from it. They have their design and code-behind. The file extension for user controls is ascx.
What Is The Meaning Of Garbage Collection
Garbage collection is a process that is used to maintain various aspects of memory to prevent memory leaks during program execution.
An entity called the garbage collector is used to allocate and de-allocate memory as and when required by an application. This is done by performing checks on the references of variables and objects used by the application. If an object is no longer required by the application, the memory is de-allocated and freed up.
If you want to learn Data Structures in C and master various aspects of the C programming language, make sure to check out C Programming Course from Intellipaat.
You May Like: How To Prepare To Interview Someone