Finding talented developers is always a challenge and in the current economic climate many developers are holding off moving to a new position. As such, contract houses are submitting any available candidates for every position. This practice is not only another reason to avoid contracting shops but is rather taxing on the company looking to fill a position.
The man hours spent screening a single applicant can quickly balloon over 8 man hours. My current client recently felt this pain and decided to require the consulting houses to have their candidates fill out a questionnaire. In an environment with many different technologies and developer background experiences coming up with a questionnaire that covers technical, theoretical as well as passion is a daunting task.
Below is one of the recent questionnaires I filled out that I thought balanced technical and theoretical questions well. Some of the details have been redacted. And oh’ Be warned, I have no idea if these answers are correct
What is reflection?
reflection is a way you can interrogate (inspect and/or invoke) objects in a running application.
How do you inherit from a class in C#? (give a code sample)
public class GreatClass:Baseclass {}
When you inherit a protected class-level variable, who is it available to?
The derived class and of course the base class.
Describe each accessibility modifier (public, private, etc).
Public: can be accessed by anyone
Private: can only be accessed from inside the base class
Protected: can be accessed by derived and base class
Internal: like public by also must be in the same assembly
Protected Internal: like private by also must be in the same assembly
How is method overriding different from overloading?
overriding changes the functionality of a base method, overloading creates another method with different inputs/attributes (post in MVC)
What does the keyword virtual mean in the method definition?
virtual methods are methods that the derived class must override.
How can you overload a method?
By changing the type or number of parameters.
What’s the difference between an interface and abstract class?
An abstract class is something that I don’t often use. Really; C# does not support multiple inheritance so we often use interfaces to define our entities and hierarchies. In c# we can inherit from one abstract class and implement multiple interfaces.
What is the default accessibility for a class?
Private
Can you implement multiple interfaces?
Yes
What is a delegate?
The C# version of AddressOf
Code a short and simple delegate example. Code the same sample with a lambda expression.
1: public delegate int myCalc(int x, int y);
2:
3: public class doMath {
4: public string Add(int x, int y){ Console.Wr...etc }
5: public string Sub(int x, int y){ Console.Wr...etc }
6: }
7:
8: public static void Main(){
9: myCalc adder = new myCalc(doMath.Add);
10: adder(1,1);
11: }
12:
13: public static void Main(){
14: myCalc adder = (doMath.Add);
15: adder(1,1);
16: }
17:
18:
Strings are immutable, what does this mean?
The contents will not change once created, methods like toLower will not effect the string, only the output.
Code an enumeration for a status where options are: Queued, In Process, Finished
enum Status { Queued, In Process, Finished };
Can C# have multiple catch blocks?
Sure
What are design patterns?
Examples of how people smarter then me make my job easier.
Describe two design patterns you have used in a project.
Singleton! – Really; it’s was a good use…for a WCF Service to cache database results and serve those results to all web clients.
I’m not sure if MVC counts but It what I miss right now…MVVM is fine for large SL projects and the Flex stuff I am doing…well…as some of the Headspring guys on twitter might now, I’m not happy with it.
What are the most important aspects of an effective software development team?
Communication, planning, direction, understanding the problem domain (++DDD)
What is your experience with test-driven development? What are its limitations? What are its strengths?
I’m a fan and I use it where I’ve been able to convince a project manager that it fits into a project plan. When I have to take over a project without unit tests I feel lost. TDD, like design patterns, are something I love that makes my job easier.
What is your experience with Extreme Programming? What are its limitations? What are its strengths?
Not enough; the last 3 years I’ve been stuck in a big-design-up-front, not even waterfall, we spent a year on documents. 5 people, 1 year. sick. I was in a XP environment in 2001-2003.
Will this code compile? What will be its output?
Sample code was provided.
Write the PRECISE output of this code as it would appear in the console.
Sample code was provided












