Interview Questions

1        .NET Specific

1.1       .NET 1-5 Rating Questions

What are Properties in C#, what are its advantages? Explain the 3 types of properties in C#?
What is a virtual property. Give an example?
What is an abstract property. Give an example?
What is diff between const and read only?
What are the differences between value types and reference types?
What is Boxing and Unboxing?
What is the difference between string keyword and System.String class?
Are string objects mutable or immutable? Why is it immutable ?
Difference between string and StringBuilder in c#
Collection and Generics
What are Advantages and disadvantages of using generics?
What is Collection?

·        What collection to use when you need a sequential list where the element is typically discarded after its value is retrieved?

·        If need random access to Items?

·        If Need access to elements by Key?

what is jagged array in C#?
What’s the difference between IEnumerable and List ?
What’s the difference between IEnumerable and IQueryable ?
What is LINQ? What is the benefit on using LINQ over Dataset ?

1.2       .NET 5-10 Rating Questions

Difference between EXE and DLL
What is DLL HELL in .NET
Delegates and Events
What is a delegate? What is the main use of delegates in C#?
What do you mean by chaining delegates?


What is a multicast delegate?
What are different Type of Delegates in C# ?
What is .NET Remoting? What are the 2 message encoding formats supported by .NET Remoting and when do you choose one over the other? What are the 2 message encoding formats supported by .NET Remoting and when do you choose one over the other?
If a method’s return type is void, can you use a return keyword in the method?
What is the difference between Threads and Tasks?
What are Concurrent Collection Classes?

2        Object Oriented Programming

2.1       OOP 1-5 Rating Questions

What are Constructors? Can a class or a struct have multiple constructors?
Can a child class call the constructor of a base class?
Explain the difference between passing parameters by value and passing parameters by reference
What is the main advantage of using inheritance?
What is Polymorphism and Inheritance?
When can a derived class override a base class member?
What is the difference between a virtual method and an abstract method?
What is interface? Can an Interface contain fields?
What is the difference between function Overloading and Over Riding?
What are different type of Access Modifiers in C#?
What is a sealed class?
Can derived classes have greater accessibility than their base types?
What are the difference between interfaces and abstract classes
Does C# support multiple class inheritance? Why C# does not support multiple class inheritance? (Diamond Problem)
What are Advantages of using Interfaces

2.2       OOP 5-10 Rating Questions

What are the difference between interfaces and abstract classes
What is a partial class. What are the advantages of using partial classes? Is it possible to create partial structs, interfaces and methods? Can different parts of a partial class inherit from different interfaces?
Can a class have static constructor? Can you have parameters for static constructors?
Can you pass value types by reference to a method?
Design Patterns And Principles
What is SOLID Principle ? What is Single Responsibility Principle?
What different Types of Design Patterns in C# ? What purpose they are used ?
What is Singleton Pattern? Why is it used?
What is Factory Pattern  ? Why is it used?
What is Bridge Pattern ? Why is it used?
What is Adapter Pattern ? Why is it used?
What is Strategy Pattern? Why is it Used?
What is Observer Patter? Why is it Used

3        Database

3.1       OOP 1-5 Rating Questions

What is the difference between Having and Where clause
What is the difference between Drop, Delete and Truncate statements in SQL Server?
DIfference between primary key and unique key in SQL Server?
What is Cascading referential integrity constraint?
What is the use of an Index in SQL Server?
What are the 2 types of Indexes in SQL Server?
What is a Trigger in SQL Server?
What is the difference between inner join,left outter join and right outer join?
Write the Query to get the Second Largest value in the Table ?

3.2       OOP 5-10 Rating Questions

What are the 2 types of Temporary Tables in SQL Server?
What is the difference between Local and Global Temporary Tables?
In which database, the temporary tables get created?
What you  will do if the query below is performing very slow?

What are Partition Tables? And when to use them ?
What is the difference between a Temporary Table and a Table Variable?
What is the difference between a User Defined Function (UDF) and a Stored Procedure (SP) in SQL Server

4        Web

ASP.NET Page is very slow. What will you do to make it fast
What is page lifecycle of ASP.NET
what is veiwstate? Difference between EnableViewState and ViewStateMode properties?
What is the difference between layers and tiers. Advantages ?
What are the different Session state management options available in ASP.NET?
What is caching in ASP.NET
What is MVC?
What are Cookies in ASP.NET? What are different types of Cookies?

What is Query String in ASP?
What are different page navigation techniques in ASP.NET?

5        Desktop

What is a DataSet? Can you enforce constarints and relations on tables inside a DataSet?
What is the difference between DataSet.Copy() and DataSet.Clone()?

6        SharePoint


Reusing the Operating System For VM Domain issue.

When you are trying to run the VM on your previously stored VHDX, And when you try that machine to join the DC and your domain controller also uses the same copy of your VHDX file, then you get the SID Error, do the following to ignore the error:

  1. At the command prompt, change to the root folder of drive C, Type C: then type CD %SystemRoot%\System32\Sysprep
  2. and then run sysprep



Top 10 Microsoft Dynamics CRM Integration

Proposing Dynamics CRM to The Small and large Scale Business Organization has been much easy because the system is capable of integrating with different Microsoft Products and 3rd Party Applications.


The integration Is easy and doesn’t require many configurations in the case of Microsoft Products. This article will discuss side by side the Integration capabilities of Dynamic CRM online And Dynamics CRM 2016.

1.1       Microsoft SharePoint

After using the Dynamics CRM the first thought comes into your mind that although you are storing in the information and the activities related to customer interaction or you are giving services to your client after the successful opportunity. But now you are willing to store the Documents Related to leads, opportunity or services may be.

Although this can be achieved through storing the Attachments in the ‘Notes’ Entity of the Dynamics CRM. So this full fills the solution of attachments. But now when I need to search for my document in the CRM, I have to go through all my notes section to get the information out.  Similarly, the storage issue is the bigger when you use the Dynamics CRM Online, the storage is filled in instantly when you use to CRM to store the attachments.

This is where SharePoint comes into play, Dynamics CRM Allows integration with SharePoint in two ways i.e. Server Based Integration and Client Based integration. Client based integration uses a sandbox solution will be obsolete in the future. Whereas server based solution is supported on both On-Premises and Online Integration. The Diagram shows the Two Way Path of integration between SharePoint and Dynamics CRM. Dynamics CRM Support the Following Server Based Integration:

  • SharePoint on – Premises to Dynamics CRM On-Premises
  • SharePoint online to Dynamics CRM On-Premises
  • SharePoint online to Dynamics CRM Online
  • SharePoint on – Premises to Dynamics CRM Online


1.2       Microsoft Outlook

I remember my client complaining about how hard is for him to track the email activities with his client in Dynamics CRM. He wasn’t at all comfortable with sending or receiving the emails through Dynamics CRM Web interface.  Moreover, most of the business user aren’t comfortable of logging into the CRM Web Interface and manage their email activities.

Dynamics CRM offers an outlook add-on which can heal the pain area of tracking the email activities or creating the leads directly from outlook. Following are the benefits integrating outlook with Dynamics CRM

  • Automatically link Outlook emails to associated CRM records including contacts and opportunities
  • Create personalized CRM views in Outlook
  • Access all CRM end-user functions in the Outlook interface
  • Open CRM records from any linked Outlook email
  • Rely on the familiarity of Outlook to reduce training costs & gain rapid user acceptance

The Above add-on can be used with both Dynamics CRM On-Premises and Dynamics CRM online.


1.3       Microsoft Exchange

In order to Outlook work with dynamics CRM, we need to integrate Dynamics CRM with Exchange. Dynamics CRM can be integrated with Exchange and Exchange Online using server-based integration as shown in the diagram.

With the Exchange Integration, the user will be able to sync all the contacts, appointments and tasks at a single place in CRM. And Similarly, the Automated Emails can only be generated from CRM if the integration is done with Exchange.


1.4       Yammer

I am a kind of a person who usually works with different sales team on an opportunity, I like communicating with my colleagues on lead, opportunities or even on services. All these communications are on mail on Phone calls, all though we can track the phone calls and emails in the dynamics CRM. But what about my users who are not a part of Dynamics CRM.

Using Activity feeds of Dynamics CRM just allow to be social with the dynamics CRM users, but not other users. So Dynamics CRM allows integration with Yammer so you can collaborate with the users inside the CRM and or users who aren’t the part of CRM. As getting social is equivalent to bring in success as a team.

Dynamics CRM Online and Dynamics CRM On-Premise allows integration with Yammer. But for that, you need to purchase Yammer Enterprise Subscription per user.


1.5       One Note

Getting notes while working on the Tasks, is a day to day routine for us. Getting Notes really helps us when we get back to the task. One of my clients had complained that it’s hard managing multiple leads because he needs something that reminds him that what was the last working he has done on the lead, opportunity, quotes, orders, Cases etc.

Dynamics CRM Online allows integrating One Note, and this requires the Subscription of Office 365. Integration with One Note:

  • You can easily take notes against each Opportunity, Leads, or any other entity
  • No more hustles when coming back to the pending Leads
  • Easy Interactive, capturing of notes.


1.6       Power BI

It’s a world of big Data, and the next big thing in the future is to analyze the data to extract the patterns and the main goal is to increase the revenue. Dynamics CRM offers rich Dashboards and charts but they have limitations. With the Help of Power BI, this limitation can be broken and the rich analysis can be done to get higher revenues. Reports on Power BI can be generated using Dynamics CRM OData Layer.

Dynamics CRM exposes its data using the DATA Web service Layer, Power BI can extract the data and based on it create the reports and rich Dashboards for executives and employees.


1.7       Office 365

Managing Hardware has been problematic for the corporates, as they have to hire IT, team, to manage the resources, which in turn bring cost Software, Hardware, and Resources to manage them. Office 365 being a cloud Solution offers Dynamics CRM online to easily integrate with the following:

  • SharePoint Online: Integrate for Document Management
  • Exchange Online: integrate to Generate emails from CRM to customers.
  • Skype For business: Communicate within a team and Contact the clients directly using Skype for business, by getting rid of traditional calling methodologies
  • One Note: track the notes against the leads, opportunities.
  • Yammer: Collaborate and work
  • Power BI: Rich Dashboards and Reports
  • Outlook App: Use outlook with Dynamics CRM Online, for creating the leads directly from email and much more.

1.8       ERP Integration (Dynamics AX, Dynamics GP, Dynamics NAV)

Microsoft has released a data integration tool for linking Microsoft Dynamics NAV/AX and Microsoft Dynamics CRM – creatively called the Microsoft Dynamics Connector.

The connector allows for out of the box bi-directional integration between the ERP entities and the CRM entities such as Customer, Invoices, Sales Orders, and Items. The connector works with both on-premise and online and uses web services for the data integration. The integration will look at the following entities in the Microsoft Dynamics ERP and Dynamics CRM:


1.9       Integration with ESB

Dynamics CRM exposes the SOAP based Interface through which the external Entities can connect and communicate with Dynamics CRM. Moreover following are the Areas in which integrations can be done:

  • Custom Workflow activities
  • Plug-ins
  • Discovery Service of Dynamics CRM

However, in order to integrate with the ESB, Following are the products that can be used to perform the operations in the Corporate Environment:

  • Azure Bus
  • BizTalk
  • Mule


On Form Load Check the User Team and Lock the form the if the owner of the record team doesn’t matches with Logged in user.

Following code will help you in the following:

  • getting the team names in the system
  • getting the team associated with the user.
  • validating the action if the team name doesn’t match

On Load Function that calls the getCurrentUserTeamNames

function Form_OnLoad_ValidateUserTeam() {
    var userTeams = getCurrentUserTeamNames();
    if (userTeams != null && userTeams.length > 0) {
        if (!isValidateFormAccess(userTeams)) {

function isValidateFormAccess(userTeams) {
    var recordOwner = Xrm.Page.getControl("header_ownerid").getAttribute().getValue();
    //var myStringArray = ["Hello", "World"];
    var userTeamsLength = userTeams.length;
    for (var i = 0; i < userTeamsLength; i++) {
        if (userTeams[i] == recordOwner[0].name) {
            return true;
        }   //Do something
    return false;

GetCurrentUserTeamNames: this function will return the team names of the user

function getCurrentUserTeamNames() {
    //ajax call to get data from CRM
    var serverUrl = location.protocol + "//" + + "/" + Xrm.Page.context.getOrgUniqueName();
    var odataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc" + "/" + "TeamSet?$select=Name,TeamId";
    var userTeams = [];
         type: "GET",
         contentType: "application/json; charset=utf-8",
         datatype: "json",
         async: false,
         url: odataSelect,
         beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("Accept", "application/json"); },
         success: function (data, textStatus, XmlHttpRequest) {
             for (var i = 0; i < data.d.results.length; i++) {                  if (Check(data.d.results[i].TeamId)) {                      //alert("You are associated with team: " + data.d.results[i].Name);                        userTeams.push(data.d.results[i].Name);                  }              }              },            error: function (XmlHttpRequest, textStatus, errorThrown) {              if (XmlHttpRequest && XmlHttpRequest.responseText) {                  alert('OData Select Failed: ' + textStatus + errorThrown + odataSelect);              }          }      }     );       return userTeams; }       function Check(teamid) {       var userId = Xrm.Page.context.getUserId(); //Fetching user Id of current logged in user     var serverUrl = location.protocol + "//" + + "/" + Xrm.Page.context.getOrgUniqueName();     var odataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc" + "/" + "TeamMembershipSet?$filter=SystemUserId eq guid'" + userId + "' and TeamId eq guid'" + teamid + "'";     var boolFlag = false;     $.ajax     (      {          type: "GET",          contentType: "application/json; charset=utf-8",          datatype: "json",            async: false,          url: odataSelect,            beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("Accept", "application/json"); },          success: function (data, textStatus, XmlHttpRequest) {              if (data.d.results.length > 0) {
                 boolFlag = true;
         error: function (XmlHttpRequest, textStatus, errorThrown) {
             if (XmlHttpRequest && XmlHttpRequest.responseText) {
                 alert('OData Select Failed: ' + textStatus + errorThrown + odataSelect);
    return boolFlag;
    //return false; //Returing false if the user is not associated with the team
function DisableFormFields() {
function RefreshGrids() {
    var opportunitySubgrids = Xrm.Page.getControl(function (ctrl, i) {
        if (ctrl.getControlType() == "subgrid") {
            return (ctrl);
        else {
            return false;
    opportunitySubgrids.forEach(function (attribute, index) {
        var control = Xrm.Page.getControl(attribute.getName());
        if (control) {
function disableAttrs() {
    debugger; (attribute, index) {
        var control = Xrm.Page.getControl(attribute.getName());
        if (control && (control.getName() != "processid" && control.getName() != "stageid")) {
    Xrm.Page.ui.setFormNotification("The Form is Locked", "INFORMATION")
function tabdisable(tabname, disablestatus) {
    var tab = Xrm.Page.ui.tabs.get(tabname);
    if (tab == null) alert("Error: The tab: " + tabname + " is not on the form");
    else {
        var tabsections = tab.sections.get();
        for (var i in tabsections) {
            var secname = tabsections[i].getName();
            sectiondisable(secname, disablestatus);
}   // tabdisable
function sectiondisable(sectionname, disablestatus) {
    var ctrlName = Xrm.Page.ui.controls.get();
    for (var i in ctrlName) {
        var ctrl = ctrlName[i];
        var ctrlSection = ctrl.getParent().getName();
        if (ctrlSection == sectionname) {
}  // sectiondisable

Please Feel Free to contact me if anyone face issues. The current Code requires that

Jquery and Json must be included in the form