Category Archives: Interview Questions

Interview Questions

What is WCF Reliable Messaging?

WCF Reliable Messaging makes web services more reliable. It addresses the following problems: A call to a web service does not make because the networks are not perfectly reliable as they suffer congestion and may drop signals. OR the service response does not make it back to the client. If I make multiple calls to Continue Reading…

@Html.Action vs @Html.RenderAction in Asp.Net MVC

@Html.Action @Html.Action returns string. Syntax : @Html.Action(“Action”,”Controller”). Pass parameter with Action method Syntax : @Html.Action(“Action”,”Controller”, new {ParameterName=ParameterValue}). It is slower as compared to @Html.RenderAction. It’s result can be manipulated before rendering to the output stream. Manipulation : @{ var data= Html.Action(“Action”,”Controller”, new {ParameterName=ParameterValue}); } @data I am Software Developer. Use when data length is small or need to manipulate result Continue Reading…

@Html.Partial vs @Html.RenderPartial in Asp.Net MVC

@Html.Partial @Html.Partial returns string. Syntax : @Html.Partial(“Partial View Name”). Pass model with Partial method Syntax : @Html.Partial(“Partial View Name”, Model). It is slower as compared to @Html.RenderPartial. It’s result can be manipulated before rendering to the output stream. Manipulation : @{ var data= Html.Partial(“Partial View Name”); } @data I am Software Developer. Use when data length is Continue Reading…

Soap vs Rest API

Soap SOAP stands for Simple Object Access Protocol. SOAP is a protocol. SOAP uses HTTP and SMTP transport protocol. SOAP supports only XML format. Using HTTP, SOAP model can tunnel to across firewalls and proxies without any modification to the SOAP protocol. SOAP is more secure as compare to REST because it uses own security Continue Reading…

What are events in C#?

Events Events is a way for a class to provide notifications to clients of that class when some interesting things happens to an object. Events are declared using delegates. Events can only be invoked from within the class that declared them. Derived classes can not directly invoke events declared within the base class. To call Continue Reading…

How to call child action method in Asp.Net MVC.

Child action methods can not be called directly. They have to call from inside of a view. We can make an Action method a child action method by decorating it with [ChildActionOnly] attribute. Calling child action method from inside of a view Where “Child” is the Action method name and “Home” is the controller name.

When to use var instead of type in C#.

Example 1 Here it is an optional to declare i as var type. Because we know the value is integer type. Example 2 it is also an optional to use var instead of string. Because we know all elements are string. Example 3 Use var when we have to deal with anonymous type data.

Difference between Abstraction and Encapsulation.

Abstraction Abstraction means hiding implementation. Abstraction can be achieved by interfaces or abstract classes. Abstraction focuses on the outside view of an object (i.e. the interface) TV Remote is the real world example of abstraction where we know little bit how to operate it. but does not know how they are implemented internally. Encapsulation Encapsulation Continue Reading…

Why multiple inheritance of classes is not supported in C#?

Multiple inheritance of classes is not supported in C# because of the diamond problem. Diamond Problem: If in a scenario there is a Class A have a Print method. And another classes B and C is overriding Class A Print method with single inheritance concept. Now we have a class D which inherit both these classes B Continue Reading…