How questions are asked in c# interviews?

33 0 0
                                        

Introduction

When you are attending programming interviews you will always see a specific pattern in which the interviewer asks questions. It’s always good to know about this pattern so that you can perform well during interviews. I term this pattern as “What”, “Why “and “How” pattern .

 “What” :- Do you really know the topic.

 99% times a logical interviewer starts with “What” first. He tries to get a sense that do you at least have an idea of the topic. For instance let’s say the topic is “Delegate”. So the first question he would spin is “What is a delegate ?”.

In “What” kind of questions the interviewer is expecting sweet and to the point one liners which communicates that yes you know the topic. For example:-

Interviewer :- What is a delegate ?

Jobseeker :- Delegate is a pointer to a function.

“How”:- Are you hands on?

Once the interviewer is confident with the “What” part he can then ask questions of type “How” and “Why”. The “how” part tells the interviewer, Are your really hands-on the topic?.  Below is a simple example for the same:-

Interviewer: - How do you do forms authentication in ASP.NET? JobSeeker :-  For forms authentication we need to do the following things :- 

Step 1:- Set the mode=”Forms” in web.config file.

Step 2:- In the code behind of the login page we need to call

"formsAuthentication.RedirectedfromLoginPage" function

In the “How” part the interviewer is expecting you to provide overall important steps of you will execute that task.   “Why”:- Do you really know the depth of the topic?

The “Why” part of questions are tough ones. In this the interviewer tries to probe how much do you know the topic.  In this section he will probe in to real time scenarios and will try to probe do you know the topic in-depth.

For example:-

Interviewer: - Why is MVVM pattern for WPF and SL? Candidate: - Because WPF and SL have rich bindings.

A simple example of questions around delegate

What is a delegate? Delegate is a pointer to a function.

How do you code a delegate? We first declare the delegate by using the “Delegate” keyword and point method to that delegate and then invoke the method by calling the “Invoke” method.

Why do you need a delegate? Delegate is needed to provide callbacks. For instance you have a UI from which a long running routine is called. If your UI wants updates from that long running routine, then the UI can provide a delegate to the routine and the routine can send message via that delegate back to UI.

Some references for preparing .NET interviews:-

You can start from these 12 important c# interview questions and answer videos

You can start viewing c# interview questions and answer videos.

SQL  Server interview question videos

You can also see .NET interview question videos from this youtube channel.

You can also see .NET and c# interview question blog which is maintained by Shivprasad koirala himself.

How questions are asked in c# interviews?Where stories live. Discover now