Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a possible C# dev job lined up but before I can interview, I need to pass a test with the employment agency.

Now even though I am a senior developer with over 10 years of programming experience and more than 3 of these years with c#, I am really not looking forward to this test and I think there is a good chance I will fail it.

In my experience these tests are unpredictable asking you stuff you seldom use in everyday work situations.

I need your best advice on what I should be revising on - a good book or website for example. I have less than 1 week to prepare and it is essential I pass this.

Thanks in advance.

EDIT: To further justify my concerns of writing such tests - Consider the following question:

12) An Event is :

   a) The result of a users action - correct answer
   b) The esult of a party
   c) code to force users action

The correct answer according to the test is A, but since I've been doing SOA development (often when events can be based on system events (not user actions) I'm 100% sure an event doesn't have to be driven by a user action. This was also a C# question (not an ASP.net question). Based on my understanding, I couldn't really spot a correct answer but B seems the best of the lot (if the definition of party is : any entity that can trigger an event. These kind of questions scare me.

share|improve this question
4  
If you're a 'senior developer', and you've been using C# day-to-day for three years, you should be ok. These tests are normally meant to weed out those people that don't know the language or its uses. If you've been using it day to day for 3 years, then you should have run into nearly all the pitfalls in a given test. –  George Stocker Nov 3 '11 at 15:28
9  
@GeorgeStocker - actually, I had to take some of these tests (aimed more at the full .NET framework) and they were very detailed. I found them quite difficult because first they went into areas of the framework (like WCF) where I just didn't have much experience, plus you had to know stuff like what configuration option you'd use in a .config file to turn on some obscure option. It was stuff you'd rarely bother memorizing because you'd probably only ever use it once and Google it at that. I found the experience a bit frustrating. –  Scott Whitlock Nov 3 '11 at 15:37
4  
Oh, and one of the questions I got wrong was, "in VB.NET, what is the keyword used for declaring a structure? a) struct b) Struct c) structure d) Structure". I was thinking "intellisense knows this so I don't have to!" Now, of course, the answer is seared into my memory. –  Scott Whitlock Nov 3 '11 at 16:05
16  
@ScottWhitlock: There's no way you can adequately prepare for a poorly-designed interview. At some point you have to trust that they're competent enough to ask and judge based on the areas you actually claim to specialize in, as well as some conceptual ability. If they're not, then you'd probably have a miserable time working for them anyway. –  Aaronaught Nov 3 '11 at 16:29
2  
Is this a C# language test, or a .NET Framework test? –  Ants Nov 3 '11 at 16:55
show 6 more comments

7 Answers

up vote 11 down vote accepted

Altough somewhat old, maybe this blog post is useful for you: What Great .NET Developers Ought To Know (More .NET Interview Questions)

Everyone who writes code

  • Describe the difference between a Thread and a Process?
  • What is a Windows Service and how does its lifecycle differ from a "standard" EXE?
  • What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
  • What is the difference between an EXE and a DLL?
  • What is strong-typing versus weak-typing? Which is preferred? Why?
  • Corillian's product is a "Component Container." Name at least 3 component containers that ship now with the Windows Server Family.
  • What is a PID? How is it useful when troubleshooting a system?
  • How many processes can listen on a single TCP/IP port?
  • What is the GAC? What problem does it solve?

Mid-Level .NET Developer

  • Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.
  • Describe what an Interface is and how it’s different from a Class.
  • What is Reflection?
  • What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?
  • Are the type system represented by XmlSchema and the CLS isomorphic?
  • Conceptually, what is the difference between early-binding and late-binding?
  • Is using Assembly.Load a static reference or dynamic reference?
  • When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate?
  • What is an Asssembly Qualified Name? Is it a filename? How is it different?
  • Is this valid? Assembly.Load("foo.dll");
  • How is a strongly-named assembly different from one that isn’t strongly-named?
  • Can DateTimes be null?
  • What is the JIT? What is NGEN? What are limitations and benefits of each?
  • How does the generational garbage collector in the .NET CLR manage object lifetime? What is non-deterministic finalization?
  • What is the difference between Finalize() and Dispose()?
  • How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
  • What does this useful command line do? tasklist /m "mscor*"
  • What is the difference between in-proc and out-of-proc?
  • What technology enables out-of-proc communication in .NET?
  • When you’re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?

Senior Developers/Architects

  • What’s wrong with a line like this? DateTime.Parse(myString);
  • What are PDBs? Where must they be located for debugging to work?
  • What is cyclomatic complexity and why is it important?
  • Write a standard lock() plus “double check” to create a critical section around a variable access.
  • What is FullTrust? Do GAC’ed assemblies have FullTrust?
  • What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
  • What does this do? gacutil /l | find /i "Corillian"
  • What does this do? sn -t foo.dll
  • What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
  • Contrast OOP and SOA. What are tenets of each?
  • How does the XmlSerializer work? What ACL permissions does a process using it require?
  • Why is catch(Exception) almost always a bad idea?
  • What is the difference between Debug.Write and Trace.Write? When should each be used?
  • What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
  • Does JITting occur per-assembly or per-method? How does this affect the working set?
  • Contrast the use of an abstract base class against an interface?
  • What is the difference between a.Equals(b) and a == b?
  • In the context of a comparison, what is object identity versus object equivalence?
  • How would one do a deep copy in .NET?
  • Explain current thinking around IClonable.
  • What is boxing?
  • Is string a value type or a reference type?
  • What is the significance of the "PropertySpecified" pattern used by the XmlSerializer? What problem does it attempt to solve?
  • Why are out parameters a bad idea in .NET? Are they?
  • Can attributes be placed on specific parameters to a method? Why is this useful?

C# Component Developers

  • Juxtapose the use of override with new. What is shadowing?
  • Explain the use of virtual, sealed, override, and abstract.
  • Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d
  • Explain the differences between public, protected, private and internal.
  • What benefit do you get from using a Primary Interop Assembly (PIA)?
  • By what mechanism does NUnit know what methods to test?
  • What is the difference between: catch(Exception e){throw e;} and catch(Exception e){throw;}
  • What is the difference between typeof(foo) and myFoo.GetType()?
  • Explain what’s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?
  • What is this? Can this be used within a static method?

ASP.NET (UI) Developers

  • Describe how a browser-based Form POST becomes a Server-Side event like Button1_OnClick...
share|improve this answer
    
Every answer listed here was helpful and good, however I went through every question in your list (took me 4 hours), and wrote a sample test online and passed. I would encourage any .net developer to go through those questions at least once and make sure you understand the answers, and make sure you get 2nd and 3rd opinions. A lot of people answer the questions (found on Google), but a lot of the answers are not concise at at times even wrong. So be careful. Cross check what answers you find. –  JL01 Nov 4 '11 at 10:35
    
Good link! I'm surprised how many of those I knew. this.Ego++; –  justnS Nov 5 '11 at 18:14
    
@justnS: The same happened to me when I discovered the post. :-) –  Konamiman Nov 5 '11 at 21:48
    
I went for an interview a couple of weeks ago, and they had this printed off for me to answer. which to me, reflected on the interviewer. –  dbones Jul 20 '12 at 13:18
    
When will you add the answers? ;) –  Thijs van Dien Oct 7 '13 at 18:43
add comment

I was in a situation like yours last year. It had been so long that I've been in an interview that I was dreading it. I did a search for C# interview questions and found several sites (many of them listed by the other posters) and I studied them. Much to my surprise 90% of the interviews were from those very site, verbatim. I guess interviewers use Google as well to find questions :)

share|improve this answer
add comment

I totally agree with you on:

tests are unpredictable asking you stuff you seldom use in everyday work situations.

..but they are part of the process, so there's nothing we can really do about it. I am somthing like you with about 10 years experience of which about 5 in .NET C#. I found these that these two VERY good books:

C# in Depth

C# in a Nutshell

should cover everything you need to know about C#. The rest is your own skills and skills that you pick up on specific technologies based on C# like ASP.NET etc.

share|improve this answer
3  
but they are part of the process, so there's nothing we can really do about it. How about advocating not having silly programming tests at your place of work as part of the hiring process? Hiring processes should show your competence, not that you can memorize obscure trivia. –  joshin4colours Nov 3 '11 at 15:46
    
@joshin4colours - that is why I believe in the good ol' long conversation on the interview...they are good for elimination though –  Bojan Skrchevski Nov 3 '11 at 16:00
1  
I actually interviewed the author of one of the books and rejected him... –  Sklivvz Nov 5 '11 at 17:37
add comment

Just walk away, Renee

I've taken tests like this a couple of times. Now I just walk away. The tests measure the most trivial bits of programming knowledge. Do you want to work for someone who thinks these tests are a good way to evaluate programmers? I don't.

share|improve this answer
1  
They are a good way as a minimum standard, i.e. a necessary condition, but not a sufficient condition. –  Sklivvz Nov 5 '11 at 17:38
3  
@Sklivvz: maybe, if they were good tests. Most of the commercial tests are silly exercises in trivia: "Which class would you use to read a text file?" A good developer may be able to talk for ten minutes on the differences between byte streams and character streams, and the details of UTF encodings, and still miss this question. When information is readily accessible, there's no point in memorizing it. –  kevin cline Nov 5 '11 at 22:23
2  
I agree with Kevin. There is too much information irrelevant to your job that can be in the tests. That is why they invented Google and IntelliSense - when we need answers, we find them, on the need-to-use it basis –  ADNow Nov 5 '11 at 23:34
    
It depends ont he test. There are tests I'd walk away from, but then there are tests that are good. We have a simple 3 programming question test. The first question is to write a simple C# app. The second asks to write 5 simple SQL queries. The thrid is a question that can't be answered without the test taker asking for more information. The first and second questions rule out completely incompetent programmers. That saves us time from interviewing people who aren't worth our time. The third question gives us insight into how a programmer approaches problem solving. Very valuable stuff. –  Pete Oct 9 '13 at 14:17
add comment

If it's an employment agency test it shouldn't be that hard. It's not like they have language specialists to develop the test. Most likely all they will do is copy/paste questions from a website.

As long as you know how the framework works in general, and the most common namespaces/libraries for tasks, what stuff you have to use for certain tasks, you should be good.

share|improve this answer
add comment

These tests have increasingly become a part of pre-screening applicants by professional recruiting firms and some companies. They're designed to give non-technical interviewers a way to assess someone's technical abilities. However, they're essentially just trivia tests that won't say anything meaningful about the abilities of a programmer other than to weed out those who really don't know anything. Unfortunately, some companies/recruiters put far too much weight upon these results.

The way to study for them is to find interview question sites, legit sites and not those trying to sell you the answers, plastered with popup ads or other such nonsense, and cram on the answers. That way you'll get a decent score and leap over the hurdle. If the company is placing too much weight on these results, they probably aren't the best company to work for anyhow.

share|improve this answer
add comment

With interview tests, a lot depends on the corporate culture and test creator. If they are intent on asking obscure questions and trying to trip you up, I would move on to another firm or agency that is more interested in high quality individuals that are smart and can get the job done.

That said, as you use c# in your day job, I would concentrate you efforts of problem solving and logic and less on the book learning side of things.

Project Euler is a great place to practice and hone skills that most likely have become a bit rusty.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.