?
Solved

Interview Questions for C#

Posted on 2006-05-25
10
Medium Priority
?
15,854 Views
Last Modified: 2012-06-22
Hi,

I need to interview some candidates on their C# knowledge. Objective is to test strong C# fundamentals and .NET framework fundamentals.

Please suggest some good questions that can test conceptual knowledge.

Thanks in advance.
0
Comment
Question by:rajesh_khater
  • 3
  • 3
7 Comments
 
LVL 6

Accepted Solution

by:
neilprice earned 336 total points
ID: 16760995
0
 
LVL 6

Expert Comment

by:neilprice
ID: 16761017
Oops forget to add this sorry;

Conceptual understanding of some of the fundamentals of software engineering also helps to weed out a good versus a bad candidate.  Ask them more generalized questions about memory (eg stack vs heap), iteration vs recursion vs dynamic programming etc.  then get them to provide you with some kind of concrete example in C#.  That way you'll know if you have a skilled candidate on your hands who will may just not be that experienced with C# yet but who may pick it up quickly since he already has a great understanding of general programming.

Also basic questions getting them to define the point of Interfaces, Boxing, Delegates, Value vs Reference Types, Debugging etc. are good for short and quick definitions that you can use to lead on to more in depth examples.

Hope this helps,

Neil
0
 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 332 total points
ID: 16762208
One thing that we do when interviewing candidates is ask them to bring in sample code.  Often you can get a person that knows the book answers, but doesn't have any good practical experience.  Or the code shows very bad practices or standards (like one person we saw that they named everything in the page textbox1, textbox2, ... textbox44 and that was in code they brought to showcase thier work)

Also when you ask to bring in code samples you can ask them questions about what it does and specific sections on why it was written that way to be sure they wrote it and not someone else.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 35

Expert Comment

by:mrichmon
ID: 16762221
Also ask if they have ever heard of things like n-tier architecture, and to describe the complete development cycle of a large or complex project they have worked on.
0
 
LVL 37

Assisted Solution

by:gregoryyoung
gregoryyoung earned 332 total points
ID: 16766327
I have a tendency of asking really off the wall questions ... One of my favorites is "How much does a ferry way". I like to see how they think .. (i.e. their ability to ask questions and decompose a problem).

For technical questions I like to ask them to describe their last or favorite project and how it worked .. I will usually drill into a specific area and ask more detailed questions to get an idea of how things were applied.

I would definately cover design pattern questions in your interview as well. Don't ask things like "What is a singleton", I think it is hard to find someone who does not know ... A better question might be "What is the difference between a proxy and a decorator" or "Why would I want to use an abstract factory" (looking for related factories answer) "What is a possible issue with using factories?" "Why are singletons bad?"

Depending on how big you are on OOP I might even go into further questions on common items .. never ask the definition of something though, always ask an application or comparison question (nearly all of the "interview questions" are asking definitions etc which shows almost no understanding.

More examples:

What are some situations where Active Record would not be a good choice for me to use?
What are the 4 tenets of OOP? (then go through what each _means_)
I am writing asynchronous code, what data structures am I likely using? (Queue is the answer you are expecting to see but they might come up with others .. point is seeing the understanding of broader knowledge)
Why might I want to use a tree as opposed to a hash table? Follow up with what other data structures might I look at applying in those situations and why?
Architecture is a trade off; what am I likely losing if I gain database independence
How have generics changed C#?
What is diamond inheritance? How does .NET prevent it? (this is a great question if you have a good "talker")
What are the advantages and disadvantages of unit tests?

For .NET in specific I would probably ask  ...

winforms
What is the cardinality of threads to OS threads?
How does Control.Invoke work?
What is impersonation?
How would I make a textbox draw its text upside down?
What is GDI?
What does Application.Run do?
If I am getting an indexoutofboundsexception in wndproc, how do I catch it to keep the application from dying? What may happen if I let the application continue?

webforms
What is the life cycle of an ASP.NET page
what is the difference between a user control and a web control (web part) why might I prefer one over the other
What is the difference between a windows service and a web service (you would be amazed how many get this wrong)
Describe the ASP.NET validation process
What situational items define whether I want to store something in session, viewstate, cache, cookie.
I would probably test their javascript knowledge as well...

and of course ... my age old favorite for the "talkers" is to take old products (i.e. libraries from the late 80s or similar technology and ask how they have applied them. I had one guy tell me about his experiences loading a webservice with DEVICEHIGH=name.wsdl in config.sys and the differences from doing the same with DEVICE=name.wsdl, thats the great thing about the "talkers", they give funny answers so enjoy your time with them!)

Keep in mind that this person is making decisions everyday that have a server impact on the quality of your product, you will notice some of my quetions are silly but you learn alot from them. Ex: How would I make a textbox print its text upside down (I know for a fact they have never done this nor have they read about it:) ). I always focus on making sure they know how to think ... I can teach them how to code :)

Cheers,

Greg Young
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 16952107
I say split among neilprice {16760995} mrichmon {16762208} gregoryyoung {16766327}
0
 
LVL 6

Expert Comment

by:neilprice
ID: 16952217
I agree with mrichmon's answer above.
Neil
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Screencast - Getting to Know the Pipeline
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question