• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 15865
  • Last Modified:

Interview Questions for C#


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.
  • 3
  • 3
3 Solutions
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,

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.
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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.
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  ...

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?

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 :)


Greg Young
I say split among neilprice {16760995} mrichmon {16762208} gregoryyoung {16766327}
I agree with mrichmon's answer above.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now