Senior .Net Developer

  Home  Microsoft .Net Technologies  Senior .Net Developer


“Senior .Net Developer based Frequently Asked Questions in various Senior .Net Developer job interviews by interviewer. These professional questions are here to ensures that you offer a perfect answers posed to you. So get preparation for your new job hunting”



60 Senior .Net Developer Questions And Answers

41⟩ Explain what is Mutex?

Threads share a mutually exclusive resource manager, Mutex. It ensures that only one thread at a time makes use of one resource (one object) at a time. It is like a moderator that controls the microphone and gives the word to one person at a time. Thus, Mutex grants access to resources one thread at a time. For this, it puts the threads that want to access resources “on hold” until those are in use.

 126 views

42⟩ Explain me how does LINQ work?

Internally build the correct query (in the case of databases) 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, the same language, independently of the underlying data source.

 117 views

43⟩ Do you know the difference between the Stack and the Heap?

The short answer would be: in the Stack are stored value types (types inherited from System.ValueType), and in the Heap are stored reference types (types inherited from System.Object).

We can say the Stack is responsible for keeping track of what is actually executing and where each executing thread is (each thread has its own Stack). The Heap, on the other hand, is responsible for keeping track of the data, or more precise objects.

 142 views

44⟩ Please explain when should you use .NET Web Forms over ASP.NET MVC?

Traditionally, the .NET Framework has been based on Web Forms. This was essentially an effort to create web services using Microsoft’s existing Visual Studio Tools without forcing developers to learn new scripting languages. Web Forms still allows developers to create quick and simple applications, and some legacy systems may still run as Web Forms.

ASP.NET MVC is increasingly the standard for contemporary developers, however. In a .NET interview, a strong candidate should be able to highlight the advantages of the Model-View-Controller (MVC) architectural pattern. MVC’s most important feature is that it allows applications to be broken down into discrete models, views and controllers, making them much easier to test during development.

 128 views

45⟩ Tell us the differences between an Interface and an Abstract Class in .NET?

An interface merely declares a contract or a behavior that implementing classes should have. It may declare only properties, methods, and events with no access modifiers. All the declared members must be implemented.

An abstract class provides a partial implementation for a functionality and some abstract/virtual members that must be implemented by the inheriting entities. It can declare fields too.

Neither interfaces nor abstract classes can be instantiated.

 134 views

46⟩ Please explain what is immutability, what is it for and how is it codified?

The ability of objects not to change their state, once created, helps improve the maintainability of the code. When a mutable object encapsulates its changes without being explicit in the code, following the flow becomes difficult. The level of difficulty increases in case of multi-threaded applications. To create immutable objects, pass the arguments for their creation in the constructor; make their properties read-only later.

 125 views

47⟩ Please explain what are an inheritance, polymorphism, and encapsulation?

Inheritance is the ability to reuse definitions from one class in another and to base one class on another.

Polymorphism helps declare the same method within a class with different argument or return types.

Encapsulation is to be able to expose only the methods, property and arguments necessary to use the operations of a class. However, the detailed implementation remains private, hidden to other objects.

 114 views

48⟩ What is the Single Responsibility Principle?

Single responsibility is the concept of a Class doing one specific thing (responsibility) and not trying to do more than it should, which is also referred to as High Cohesion.

Classes don't often start out with Low Cohesion, but typically after several releases and different developers adding onto them, suddenly you'll notice that it became a monster or God class as some call it. So the class should be refactored.

 135 views

49⟩ Explain me what is the difference between an abstract class and an interface?

An abstract class is always used as a base class. It provides some abstract/virtual members that the inheriting entities must implement, as well as a partial implementation for a functionality. For extra credit, job candidates might mention that this class can also declare fields. Developers cannot create an object from this class.

An interface, on the other hand, can declare properties, methods and events only (no access modifiers). The developer must implement all declared members. In short, an interface designates a contract/behavior that implementing classes should have.

 132 views

50⟩ Explain me what is a design pattern and what is it for?

It is a reusable template to solve a common problem at the design level. It is not the code but best practices to codify a solution. Some examples are Singleton, Abstract Factory, Observer or Pub/Sub, Model View Controller, Model View Presenter, and Model-View View-Model.

 126 views

51⟩ Please explain what are an object and a class?

An object is an instance of a class, and a class is a template for creating objects. Class is the definition of an object, the description of its characteristics and operations, its properties and its methods. An object has an identity because its characteristics have values.

 116 views

52⟩ What is the concept of inheritance and how it works in .NET?

In general OOP terms, inheritance means that a class can be based on another class, with the child class taking on the attributes of the parent class. For example, coders can create a class called Vehicle, and then child classes called Truck, Car and Motorcycle — all of which inherit the attributes of Vehicle.

To demonstrate their understanding of the interview question and the framework, candidates may bring up how .NET supports single inheritance only, which means that a class can inherit only from one other class. Their answer may also touch on the transitive nature of inheritance — for example, the Ford class inherits from Car, which inherits from Vehicle.

 132 views

54⟩ Please explain what is the difference between a class and an object?

In short, a class is the definition of an object, and an object is instance of a class.

We can look at the class as a template of the object: it describes all the properties, methods, states and behaviors that the implementing object will have. As mentioned, an object is an instance of a class, and a class does not become an object until it is instantiated. There can be more instances of objects based on the one class, each with different properties.

 137 views

55⟩ Please explain what is a delegate?

It is the definition of a method that encapsulates certain arguments and type of return. It allows passing a method as an argument of a function, as long as it matches its specific signature.

 127 views

56⟩ Tell us what is a variable of implicit type and what is its scope?

It is a variable that doesn’t require type declaration since the compiler automatically determines its type. Its scope is local, within a method. It only allows inferring the kind the first time it assigns a value to the second. However, if the type is different, it throws an error.

 128 views

57⟩ Please explain is the JIT an interpreter?

No, the JIT is not an interpreter. It is a compiler at runtime that improves performance compiling method by method only once. If the method is called a new account, the native code already compiled is used. However, an interpreter executes the same every block of code.

 118 views

59⟩ Tell us what is a sealed class?

It is a class that is not inheritable. A sealed class comes in use for a super specialized class, by design, and prevents modification by overwriting.

 135 views