246

My company is about to hire .NET developers. We work on a variety of .NET platforms: ASP.NET, Compact Framework, Windowsforms, Web Services. I'd like to compile a list/catalog of good questions, a kind of minimum standard to see if the applicants are experienced. So, my question is:

What questions do you think should a good .NET programmer be able to respond?

I'd also see it as a checklist for myself, in order to see where my own deficits are (there are many...).

alt text

*UPDATE: It want to make clear that we're not testing only for .NET knowledge, and that problem solving capabilities and general programming skills are even more important to us.

Nick Craver
  • 623,446
  • 136
  • 1,297
  • 1,155
splattne
  • 102,760
  • 52
  • 202
  • 249

25 Answers25

171

Basic questions include:

I think it usually helps to ask your applicants to complete a simple coding exercise such as:

  • Write your own linked list class without using the built-in classes.
  • Write your own hashtable class without using the built-in classes.
  • Write a class that represents a binary tree. Write a method that traverses all nodes of the tree.
  • Write a method to perform a binary search on an array without using built-in methods.
  • Draw a database schema for a blog. Each user only has one blog, each blog has many categories, each category has many posts, and each post can belong to more than one category. Ask your applicant to write queries to pull specific information out.

Next, look for specific technical know-how:

  • (Event handlers) Create a class with a custom event handler, create another class which hooks onto the custom event handler.
  • (XML) Load an XML document and select all of the nodes with properties x, y, and z.
  • (Functional programming) Create a function that accepts another function as a parameter. A Map or Fold function works really good for this.
  • (Reflection) Write a function which determines if a class has a particular attribute.
  • (Regex) Write a regular expression which removes all tags from a block of HTML.

None of these are particularly difficult questions for a proficient C# programmer to answer, and they should give you a good idea of your applicants particular strengths. You may also want to work in a few questions/code sample that make use of specific design patterns.

[Edit for clarification]:

Seems that a lot of people don't understand why I'd ask these types of questions. Let me touch on a few peoples comments (I'm not quoting directly, but paraphrasing instead):


Q: When was the last time anyone used volatiles or weak references?

A: When I give technical interviews, I look to see whether a person understands the high-level and low-level features of .NET. Volatiles and weak references are two low-level features provided by .NET -- even if these features aren't used often in practice, answers to these questions are extremely revealing:

  • A good understanding of volatiles demonstrates that a person understands how compiler optimizations change the correctness of code, how threads keep local copies of shared state which may be out of sync at any given time, and is minimally aware of some of the complexities of multithreaded code.

  • A good understanding of weak references demonstrates that a person knows about the intimate details of the garbage collector and how it decides when to free memory. Sure, you could ask candidates "how does a garbage collector work", but asking about weak references gets a much better, more thoughtful reply.

.NET is a fairly abstract language, but star developers almost always have a deep understanding of the CLR and the low-level details of .NET's runtime.


Q: Why would anyone need to implement their own hashtable or linked list?

A: I'm not implying that the Dictionary class is inferior or that people should roll their own hashtable. This is a basic question which tests whether a person has a minimal understanding of datastructures. Thats what these questions test for: bare minimum understanding.

You learn about these hashtables and linked lists on the first day of Data Structures 101. If someone can't write a hashtable or a linked list from scratch, then they have a huge gap in their technical knowledge.


Q: Why are these questions so crud-oriented?

A: Because the title of this thread is "questions every good .NET developer should know". Every .NET developer begins their career writing crud apps, and 90% of all application development people do for a living is concerned with line-of-business applications.

I think questions testing a persons knowledge of line-of-business apps are appropriate in most cases, unless you're looking for developers in very specific niches, such as compiler development, game-engine development, theorem-proving, image processing, etc.

Community
  • 1
  • 1
Juliet
  • 80,494
  • 45
  • 196
  • 228
  • These questions seem to be rather CRUD-oriented. – TraumaPony Dec 17 '08 at 10:56
  • quite, and not exactly standard either = can't remember the last time I marked anything volatile, nor have many of my recent projects used viewstate or datatables - ask them about what they claim to know and the truly universal (interface vs abstract is a good example) – annakata Dec 17 '08 at 11:03
  • How about, what the difference between and left join and a left outer join? – Saif Khan Dec 29 '08 at 23:32
  • volatile in the context of multithreaded access to shared data w/o lock and weak reference in the context of custom cache implementation are a bit too exotic for "basic questions" to my taste. – DK. Feb 23 '09 at 22:01
  • 2
    Data point: I'm a C# developer and I think these questions are pretty reasonable. I could answer them, except for the ASP.NET specific viewstate/sessionstate one. – mqp Feb 24 '09 at 13:27
  • 2
    I'd like to chip in and say the questions are very reasonable. I came into this with the response that there where no good questions - testing a developer's knowledge of trivia is no measure of skill. This answer changed my mind. Just give a leeway of 1 or 2 questions answered wrong and you're good. – David Feb 24 '09 at 13:42
  • 2
    @Mark Brittingham - Yes, you must know what a short-circuited operator is to be a good C# developer, otherwise you can't even write basic checks like "if (string == null || string.Length != 3)" which depend on them. – Greg Beech Feb 25 '09 at 09:01
  • 4
    They mostly seem fairly decent; the one area I'm less convinced about is things like "write a hashtable" as many people won't ever have needed to do this. What's more important to ask with data structures is about their performance/memory characteristics and how this affects usage of them (IMHO). – Greg Beech Feb 25 '09 at 09:05
  • 3
    Princess-I apologize for being rude. Let me summarize my perspective more clearly. Having done a fair amount of interviewing, I don't think 1 in 50 developers would answer all of your questions correctly. Adding in all of your programming tasks is simply not practical: it would just take too long. – Mark Brittingham Feb 27 '09 at 02:13
  • 8
    I think your list is a good way to probe for strengths and weaknesses but it is not "basic" knowledge. As Greg points out, I was tripped up by "short circuited" operators even though they are simple and I use them often: I had just forgotten the name. Would that disqualify me? – Mark Brittingham Feb 27 '09 at 02:19
  • 33
    Similarly, I've never declared a variable "Volatile" and do very little with XML and so couldn't complete your programming task. And yet-I'm a published author, won a major programming contest, and have written 4 successful products that have won major awards. – Mark Brittingham Feb 27 '09 at 02:22
  • 24
    Thus, I don't necessarily disagree with your list - I just disagree with your characterization of the knowledge items as "Basic." None are *hard* concepts - but some are just quite specific and won't be familiar to a good number of applicants. Still - again - please accept my apologies. – Mark Brittingham Feb 27 '09 at 02:28
  • 1
    Why would I want to check if developer can implement his own hashtable? Unless I need him for writing frameworks I would rather want him to NOT do thinks like that. – Krzysztof Kozmic Feb 27 '09 at 16:13
  • Anecdotally, in several years of doing CRUD-type application, I've never gone near "volatile" or "weakreference". – Greg Feb 27 '09 at 22:48
  • I'd also just chip in to say that sinced I've started my .NET career and I've never written a CRUD app! Though I agree that's unusual. – NM. Mar 01 '09 at 09:04
  • I like your questions. I think you should first check for basics before going deeper in the interview. And I don't think I'd like to maintain code written by someone who would not answer this questions reasonably well. – Tomek Szpakowicz Mar 01 '09 at 09:17
  • Just one thing. Does .NET garbage collector really use reference counting? – Tomek Szpakowicz Mar 01 '09 at 09:19
  • 1
    I've yet to write a single CRUD app (being in one of the last graf's exempt categories) but I'm absolutely with Princess when it comes to the hashtables question. I'd no more trust a programmer who couldn't build his own hashtable than I'd trust a pilot who couldn't make a paper airplane. – Crashworks Mar 01 '09 at 09:58
  • 1
    +1 - reflection is a good thing...in people as well as programming languages. – Mark Brittingham Mar 02 '09 at 14:25
  • 1
    According to this article http://msdn.microsoft.com/en-us/library/0t81zye4(VS.71).aspx, the .NET garbage collector doesn't use reference counting (unlike COM). – tuinstoel Mar 14 '09 at 17:27
  • 6
    EVERY interview I've had for a .NET position has included: "what's the difference between string and StringBuilder?" and/or "when would you use string vs. StringBuilder?" – Dinah Mar 22 '09 at 18:01
  • 2
    Inner vs left join is a key question I always ask because I've found that 9/10 applicants with SQL on their resume can't answer it. – Jamie Ide Apr 01 '09 at 12:57
  • 39
    Half the items on this list are trivia questions. This won't help find good people, but it might annoy some of them enough to walk out on your interview. – Jason Kester Apr 11 '09 at 11:23
  • 2
    Good questions. Questions 2 and 3 seem ASP.NET-specific - someone writing e.g. a WinForms text editor wouldn't have to know either. If he claims to have ASP.NET experience, he should be able to answer both, of course. – Niki Apr 11 '09 at 11:41
  • Crapola, I'm off to learn about hashtables and data-structures.... – Simon Jun 04 '09 at 18:29
  • Good list - I ask pretty much all these in my interviews. Volatile is a little arcane but I might start throwing that in for good measure. I also ask about boxing/unboxing as it shows whether they understand about val/ref types and stack/heap – zebrabox Jun 21 '09 at 10:50
  • 3
    I use the if(blah == null || blah.length==4){} all the time and I know that if the first condition is met, the compiler won't bother testing the second. I never know it was called "short circuited" though. In other words, I know the concept, but not the word used to describe it. You can use most of these questions fine, but you can't always expect the applicant to know the right words to define them (unless they are a CS major, in which case they better know the English word used for the concept not just the mechanics :-) – Cory R. King Aug 09 '09 at 02:13
  • 2
    Viewstate and sessionstate - what if you're hiring a WinForms developer? DataTable and DataReader - once you get into O/RMs, you don't use these much. Implementing linked list - I haven't done that since taking Data Structures and Algorithms 25 years ago; I always use the library versions. I wouldn't expect a developer to be able to write Reflection code from memory. And I would consider using a regex to parse HTML an antipattern. I think you're going in the right direction, but you'll miss a **lot** of great developers with your current criteria. – TrueWill Sep 20 '09 at 16:09
  • 4
    I'd say this is a ridiculiously stupid list. I would not want to work for you! – JonH Jan 15 '10 at 20:21
  • 4
    I agree with some of the questions on the list, definitely basic...but others, like the volatile, xml, reflection, etc would need for the developer to have worked on those features very recently. Almost anyone not working on one of those topics for at least 6 months can easily forget the APIs. – GR7 Jan 22 '10 at 18:04
  • 3
    "(Regex) Write a regular expression which removes all tags from a block of HTML." GAH!! Terrible question. I would hope the developer should realize this is a trick question and refuse to write said regex. Never use a regex to parse html! – Danny Mar 22 '10 at 13:05
  • These are excellent questions, although you're unlikely to find applicants who can answer *all* of them... If they can answer *most* of them, they're probably pretty good developers IMHO – Thomas Levesque May 11 '10 at 22:29
  • 15
    `(Regex) Write a regular expression which removes all tags from a block of HTML.` - **I SMELL TROUBLE** – BlueRaja - Danny Pflughoeft Jun 18 '10 at 20:42
  • @Mark Brittingham, your comment ("Similarly, I've never declared a variable "Volatile" and do very little with XML.....") gives me a HUGE boost of self confidence. Usually such type of interview questions destroy me. THANK YOU !! – user279521 Aug 21 '10 at 23:33
  • I really, really doubt most good .NET developers know exactly what `volatile` means. The CLR memory model is one of the most obscure and difficult aspects of .NET programming you can find, and almost no one really needs to know the details about lock-free multithreading. If you don't know that `volatile` causes loads to be acquire, or if you don't know what load acquire and store release mean, then whatever you think you know about `volatile` is only dangerous, and not helpful. It's certainly *not* a basic question. – Joren Sep 18 '10 at 18:13
  • ViewState related questions are to specific to one part of .NET , it's like saying everyone should know what the OutputPort class is used for... – TimothyP Apr 28 '11 at 12:18
  • 2
    Volatiles and weak references are things that one might never have exposure to. Suddenly, when they do, they understand them well. I'd never ask such a question to gauge experience. The engineer might very well have solve travelling salesman without ever having touched this. – Kevin Hsu May 13 '11 at 20:20
  • I am now looking for a job, and all the technical interviews have had questions such as these. Is it a good way to measure my technical proficiency? I don't personally think so, but maybe asking about trivial things is the best way an employer knows to gauges a candidates exposure to a certain subject matter. Regardless, it is never a bad idea to brush up on basics. – ubiquibacon Oct 26 '11 at 02:16
135

I found these lists on Scott Hanselman's blog:

Here are what I think are the most important questions from these posts divided into categories. I edited and re-arranged them. Fortunately for most of these questions there is already a good answer on Stack Overflow. Just follow the links (I will update them all ASAP).

Platform independent .NET questions

ASP.NET

Community
  • 1
  • 1
splattne
  • 102,760
  • 52
  • 202
  • 249
  • 8
    I know of developers knowing all this and still can't see further than the book. Open-Minded is very important, besides, don't try to get too much detail answers, just make sure they understand the concept. – Saif Khan Dec 29 '08 at 23:31
  • I agee, Saif. But on the other hand, if you don't know the details, you won't be able to correctly apply the "concepts". – splattne Dec 30 '08 at 07:28
  • 2
    Some questions are really stupid, like what is difference between Debug and Release build. Yes, Visual Studio has predefined some build configurations but this is not a platform independent question. Someone who compiles by command line or using Mono, might have no idea what you're talking about. – lubos hasko Feb 22 '09 at 12:46
  • @lubos hasko: It's considered bad practice running a ASP.NET debug build on a production server - http://weblogs.asp.net/scottgu/archive/2006/04/11/442448.aspx – splattne Feb 22 '09 at 12:56
  • 3
    Are you able to describe concepts that usually take 2 pages or even a chapter of a book, in an articulate way in an interview situation. I can't without rehearsing them beforehand – Chris S Feb 23 '09 at 12:57
  • Pretty good for technology questions list. I wish someone could make a questionaire to check if candidate would write low-maintainance code. – DK. Feb 23 '09 at 22:22
  • 1
    Try not to ask people to define terms. You'll end up with CS majors who had to memorize them for tests, but miss out on people who actually know how to program. I remember being asked once what "deferencing" was. I had not the first clue, even though I did it 30 times a day back then. – Jason Kester Apr 11 '09 at 11:26
94

This might not be what you want to hear, but I would recommend not focusing on narrow technologies, but on general programming and problem solving skills. Solid developers can learn whatever you want them to do quickly.

I, for instance, am not a Compact Framework guy, so I might fail your interview if you went that direction. But if I needed to use it I could do some research and jump right in.

Joel's book, Smart and Gets Things Done, has great advice for hiring devs and there are large juicy sections about the kinds of questions to ask. I highly recommend it.

Brian MacKay
  • 31,133
  • 17
  • 86
  • 125
  • Maybe part of the hiring process should be a problem in Cardspace or something they have never looked at!! – Jennifer Dec 13 '08 at 18:00
  • Maybe, but there's the problem of research, so I think that might be unfair. I'm more interested in seeing how they think through problems and maybe seeing them to code something abstract so I can find out if they speak code natively or not. – Brian MacKay Dec 13 '08 at 18:08
  • If I could chose about two people who both have with general programming and problem solving skills, for practical reasons I HAVE to chose the one with better .NET knowledge and experience. – splattne Dec 13 '08 at 18:27
  • .NET knowledge certainly, but when it comes down to the narrower technologies I think you can go with the programmer with the problem solving skills. – Jennifer Dec 13 '08 at 18:54
  • Splattne: That's true, but in my experience, when doing inteviews you don't always encounter even a single really incredible developer! – Brian MacKay Dec 13 '08 at 19:15
  • More you learn, faster you will learn our brain works like this, if a developer doesn't know some "narrow technologies" it mays mean that he doesn't learn much. – Nicolas Dorier Apr 24 '09 at 09:29
  • 5
    Yes, we all have to know tons of "narrow technologies". But for every one we know, there are a bunch that we don't know (usually because we haven't needed them). I'm saying you don't want to miss out on a great developer for not knowing SharePoint, becuase very shortly he might be your best SharePoint guy. – Brian MacKay Oct 21 '09 at 14:36
66

I think if I were interviewing someone who had LINQ experience, I'd possibly just ask them to explain LINQ. If they can explain deferred execution, streaming, the IEnumerable/IEnumerator interfaces, foreach, iterator blocks, expression trees (for bonus points, anyway) then they can probably cope with the rest. (Admittedly they could be "ok" developers and not "get" LINQ yet - I'm really thinking of the case where they've claimed to know enough LINQ to make it a fair question.)

In the past I've asked several of the questions already listed, and a few others:

  • Difference between reference and value types
  • Pass by reference vs pass by value
  • IDisposable and finalizers
  • Strings, immutability, character encodings
  • Floating point
  • Delegates
  • Generics
  • Nullable types
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • 1
    Yes, I wanted to see this kind of answer. Good candidate for being accepted. Anyone better? – splattne Dec 13 '08 at 18:37
  • 5
    @splattne: don't be silly, this is a Jon Skeet answer, so just accept it. It is inevitable. – Steven A. Lowe Dec 16 '08 at 15:12
  • 3
    I was just about to say...wt...you don't question Skeet! – Saif Khan Dec 29 '08 at 23:28
  • 1
    This is a much better answer than the accepted one. It helps you understand whether someone has deep knowledge in an area of purported expertise while also probing knowledge of language features that run a fairly wide gamut. – Mark Brittingham Feb 23 '09 at 13:55
  • +1 I also consider basics should be solid as you have suggested, Jon. – dance2die Feb 24 '09 at 13:26
  • LINQ is a favourite interview question of mine because it can be applied to any flavour of development (xml, database, vanilla) and it shows how keen someone is to learn new things and choose the best tools for the job, even if those tools seem a little complex at first. – Rob Fonseca-Ensor Jan 22 '10 at 10:47
  • 1
    This answer beats the pants off of 'design your own Linked List, "parse HTML with regexp", or the "How much do you know about the Assembly, GAC, etc..." because it addresses tools and concepts that you'd actually use during development. Intimate knowledge of LINQ is also essential. I've seen many instances on this site where people are trying to roll their own version of Union Distinct and Concat for collections because they don't understand LINQ. – Evan Plaice Jun 19 '10 at 01:04
42

I'm with the guys that are looking for problem-solving abilities rather than the sort of thing you can look up and memorise from '101 top .NET interview Qs and As".

Just to cite myself as an example, I tend to 'know' the things I need to use from day to day. I tend to forget (and later have to re-look up) things that I use rarely.

If you wanted to trip me up in an interview, it would be very easy.

Nevertheless, I have architected and coded much of the infrastructure for a system that uses identical Business Objects and Data layers for its WinForms and ASP.NET incarnations, and our codebase is robust and reusable enough for us to be able to support and develop 20+ differently configured versions of the web site, as well as an increasing number (currently 5) of the WinForms application...

... with a development team of two.

I used to work on a team as a tech lead, and my job involved quite a lot of recruiting and interviewing. My most spectacular mistake was hiring a guy that knew more about the technology we were using than all the rest of us put together, including me, and I counted myself as an expert. He knew everything...

... except how to write code that either met the requirements, or could be understood by anyone except himself. When I eventually persuaded the PM not to renew his contract, every single thing he wrote had to be rewritten.

Structure your interviews wisely...

ChrisA
  • 4,163
  • 5
  • 28
  • 44
  • 1
    That's a really interesting observation. We had the opposite situation: a small clique of developers that knew *less* than others but who convinced management that they knew more. They proposed a data abstraction class that I argued was impossible (I was criticized for not being a "team player"). – Mark Brittingham Feb 23 '09 at 14:00
  • -continued - after 4 months of "skunk works" effort they presented the team with....their transfer papers to another dept - and NO code. The rest of the team had to pick up the pieces. – Mark Brittingham Feb 23 '09 at 14:01
  • 1
    Bottom line, though: I really like your observation that specific knowledge of coding constructs is not a guarantee of an ability to create working software that meets customer needs. – Mark Brittingham Feb 23 '09 at 14:02
34

Who is Jon Skeet?

Steven A. Lowe
  • 60,273
  • 18
  • 132
  • 202
  • 11
    Or better: Are you Jon Skeet? ;-) – splattne Dec 14 '08 at 09:46
  • this is actually good question for C# positions. Considering that Jon Skeet now owns stackoverflow/google searches for C# related. If you don't know who he is by now, you're either Jon Skeet or you're not programming in C#. – lubos hasko Feb 22 '09 at 12:54
  • 2
    No offense to Jon Skeet - but I think Rick Strahl tends to show up with the answers more frequently for the types of issues I run into.. – Andrew Theken Mar 01 '09 at 01:29
  • 1
    @[Andrew Theken]: I'll play the percentages on that one ;-) google for "Rick Strahl" yields 38,500 hits, "jon skeet" yields 144,000. Plus, Rick Strahl doesn't post on SO AFAIK. – Steven A. Lowe Mar 01 '09 at 02:30
  • 1
    both guys are great at what they do...our gain. – GR7 Jan 22 '10 at 19:40
33

Good questions I have been asked are

  • What do you think is good about .NET?
  • What do you think is bad about .NET?

It would be interesting to see what a candidate would come up with and you'll certainly learn quite a bit about how he/she uses the framework.

splattne
  • 102,760
  • 52
  • 202
  • 249
Chris James
  • 11,571
  • 11
  • 61
  • 89
18

I would always look for the soft skills myself - no pun intended. So good OO design, test driven development, a good multi (programming) lingual background and all round general smartness (and getting-things done-ness I guess!).

An intelligent developer should not have any trouble learning the individual technologies that you need them to know even if they have never looked at them before - so I wouldn't worry too much about specific questions around WCF/compact framework and the like.

I would have them write some code - best way to find out what they know and how they work. Anyone can memorise the answer to 'What's the difference between a reference type and a value type?'

Jennifer
  • 5,148
  • 2
  • 21
  • 19
  • 2
    Spot on. Asking rote questions is asking for trouble. Company I work for asks the old techie question but mostly it's: I have these problems, here's a whiteboard, shwo me how you'd solve 'em. Scary but effective. – Chris Brooks Dec 17 '08 at 10:29
  • 4
    ... but if you don't solve them the way the interviewer expects, you fail. – gbjbaanb Dec 29 '08 at 23:26
  • 1
    @gbjbaanb sometimes. But if that's the case you might not want to work there anyway. Remember, you're interviewing the company, too. I have known a few companies that failed the interview! – Tony Ennis Oct 17 '10 at 16:12
13

Honestly?

"What is .NET?"

If they can give you a clear answer as to what .NET is and what it isn't, how it's used, what elements it's composed of, etc... If they can convince you they know what it is, then chances are they know it pretty well.

The fact of the matter is, many people don't really know what .NET is. Even those who write programs for it.

Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291
11

None, really. There are probably very simple questions that the smartest people in the world do not know the answers to. Not because they are hard, but simply because they just haven't come across it. You should be looking at the whole package and the skill of the developer, not whether they can answer an arbitrary question.

If the question is easy enough to be answered in a short sentence or two, it's easy enough to just tell someone who doesn't know. You should be looking for their understanding of concepts and reasoning capability, not their ability to answer questions "every .NET developer should be able to answer."

Gene Roberts
  • 2,192
  • 3
  • 17
  • 16
10

Know the difference between reference and value types.

Know that events are stored as hard references (i.e. remember to unregister events or the application will leak memory).

Strings are immutable.

Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317
6

Martin Fowler prefers design skills over platform knowledge. On the other hand you can ask a question which will show knowledge of design patterns and .NET platform like this:

  • Name design patterns and principles you know and how they are utilized in .NET Framework?
Dzmitry Huba
  • 4,493
  • 20
  • 19
4

I suggest enquiring about blogs that they read on a regular basis and personal programming projects that they have worked on as this will show a willingness to learn and a passion for programming.

Nicholas
  • 1,740
  • 5
  • 22
  • 31
3

Here are some I've used to filter programmers applying for jobs as C# programmers:

What's the difference between a reference type and a value type?

Explain the IDisposable interface, which C# language construct requires it and how you would implement it.

Which exception would you throw if a null is passed as an argument to a method which has a contract that doesn't allow nulls for that parameter?

Mike Scott
  • 12,274
  • 8
  • 40
  • 53
3

"Which of the ASP:whatever controls would you ever use in production and why?"

That will tell you quickly whether your subject has ever actually built and maintained a large project for long enough to get burned by DataGrids and LinkButtons, or whether he's still in the Drag/Drop "teach yourself in 21 days" phase.

(the answer is asp:Repeater, asp:PlaceHolder, asp:Literal, and asp:Content)

Jason Kester
  • 5,951
  • 9
  • 35
  • 40
2

A few more:

  1. Partial classes. And its limitations?
  2. Sealed classes
  3. How localization can be done in .NET?
  4. Database connectivity
  5. Various configuration files
  6. Delegates vs events
  7. Unmanaged dll access
  8. Reflections
  9. Generic classes
  10. Hottest in .NET 3.5
  11. Unit testing frameworks you have used.
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
RameshVel
  • 64,778
  • 30
  • 169
  • 213
2

This is interesting, and at the risk of getting this down-voted for putting in my opinion, as I am born deaf, being asked a question like that would require more effort in communicating my thoughts on my part personally.

To be blunt, I really would not read too much of the typical questions, as the underlying paradigm is 'How well can you vocalize your thoughts and understanding?', that is really what the interviewer is looking for. Communicating is always my biggest weakness due to the way I am and can get frustrated quite easily.

It would be ideal to have the knowledge and be the know-it-all type but unfortunately, there are some things I don't know, but not to be afraid if you actually don't know the answer and admit it rather than bluff through it. If an interviewer asked me a question like one of the above, that I would not be sure of or mis-understand/mis-interpret the question, I would say it upfront, which can personally be embarrassing, but have learnt to handle that.

You would be surprised at how many would actually waffle on and bluff through it in which at the end of the day get caught out with their 'pants down' metaphorically speaking.

My 2cents, Best regards, Tom.

t0mm13b
  • 34,087
  • 8
  • 78
  • 110
2

What is a thread?

What is the GC?

StingyJack
  • 19,041
  • 10
  • 63
  • 122
2

This is a bit of a variable question, and not really one you should be able to answer completely now, but one you should be able to answer when appropriate:

"What does the .NET framework offer to get task X done?"

Or more specifically:

"Does the .NET framework include an object that does X?"

For example, I recently spent a few hours developing an object that is optimized to store an array of Booleans and operate on it, such as doing a collection-wise NOT, OR, XOR, AND, set all values, etc. It wasn't until after I finished writing all my unit tests and tweaking it for the best performance possible that I realized my "BoolArray" object already existed in the .NET framework under the name "BitArray".

This can be a tough one to answer since many times the best answer on what object / helpers to use is the one you do not know or fully understand. How wonderful the .NET world would be if everyone actually knew about even the simple StringBuilder, a basic tool that can increase performance significant amounts.

Spodi
  • 1,151
  • 1
  • 11
  • 19
2

I'd not ask those "know something from the textbook" questions, but rather ask some tinkering stuff like:

  • What does the foreach loop do in plain C#? (Expecting him to write a iterator loop.)
  • What's a singleton?
  • Let him/her parse a String to Datetime (expecting him/her to use TryParse instead of try/catch)
  • Implement the singleton, strategy and command patterns
  • Let him/her Refactor a piece of code for testing. Expecting him/her to abstract the external services away from the Unit under Test and implement his own Test-double of the service (providing no mocking framework)

These are not 100% sure, depending on the person I may ask them:

  • let him/her guard a method from null input (expecting him/her to use multiple returns to reduce nesting)
  • how does a object initializer work (Expecting him/her to write the thread-safe assignment)

Also I'd ask him how he/she learned his/her stuff and what he/she is reading (what blogs, books).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Tigraine
  • 23,358
  • 11
  • 65
  • 110
2

I will suggest some questions focus on understanding of the programming concepts using dotnet like

What is the difference between managed and unmanaged enviroment? GC pros and cons JIT pros and cons If we need to develop application X can we use dotnet?why? (this will identify how he see the dotnet)

I suggest also to write small methods and ask him to rewrite them with better performance using better dotnet classes or standard ways. Also write inccorrect methods (in terms of any) logical or whatever and ask him to correct them.

Ahmed
  • 7,148
  • 12
  • 57
  • 96
2

I'm a fan of the following in addition to some of the questions already mentioned:

  • What's a delegate?
  • What's the app domain?
  • When would you use the lock keyword?
  • Are the standard library generic collection classes thread safe?
  • What's an extension method?
  • What's the difference between XmlDocument and XmlReader ?
  • How do you read in configuration settings from the application config file?
splattne
  • 102,760
  • 52
  • 202
  • 249
segy
  • 644
  • 4
  • 12
1

I think it shouldn't be just questions, I know a few guys who are brilliant when you interview them but once they get to the real thing they are too much perfectionist I would say that they fail to code the task miserably.

I've been once interviewed and I kinda liked the approach where first employer gave me a technical questionnaire to fill in 30 minutes. If one is successful then he'll be called for a 1 hour interview covering Personality Judgement and Character finding questions plus technical jargons.

Then I've been asked to develop a three page web application in 6 hours time. The constraints impose in application was smartly covering major aspect of application development like a small ERD, Layerd Design, UI Consistency, controls specific problems like using Radio buttons in GridView and Fetching and displaying image types from DB on a web page, one algorithm development, security, Encryption, Hashing, Data representation and manipulation.

Then Next day they followed by a 30 minutes discussion on the developed application covering performance bottleneck areas and improvements on design and used algorithms. And 1 hour optional test to improve your algorithm developed in previous step with a specific condition.

So it took a fair amount of time but this way you can make sure that the person you are hiring knows at-least those concepts which are essential for a good developer to be.

S M Kamran
  • 4,423
  • 7
  • 25
  • 35
1

A few more:

What are the limitations of garbage collection.

Know about finalizers and IDisposable.

Be aware of the thread pool and when to use it.

If you're doing GUI applications - be aware that Windows GUI is single threaded.

Use foreach (I see a lot of people doing MoveNext etc.)

Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317
  • 1
    I didn't know, so I looked up the [limitations of garbage collection](http://stackoverflow.com/questions/3214980/what-are-the-disadvantages-in-using-garbage-collection). – MSpeed May 03 '11 at 14:49
0

I would prefer giving him a problem and asking him to solve it using the features of .net you know and why do you think it is best solution.

This will crack almost all the capabilities of a candidate in terms of technical, analytical and problem solving skills along with his approach for solving a problem.

JPReddy
  • 63,233
  • 16
  • 64
  • 93