C# and .NET quizzes
I've been quizzing my team on C# and .NET for the past few weeks to expose everyone to features they don't use regularly (or ever). The quizzes are optional and unscored, the only rewards are peer recognition and learning, and using VS.NET, MSDN, and Google to answer the questions is encouraged. The questions are a mix of "how would you", "would it compile", and "write code to", and most questions include compilable skeleton code.
Yesterday's quiz was on enumerability:
Implement a class named Alphabet that, when iterated through
using foreach, returns all of the letters of the alphabet.
using System;
using System.Collections;
class PrintAlphabet
{
static void Main()
{
Alphabet alphabet = new Alphabet();
foreach ( char letter in alphabet )
{
Console.WriteLine( letter );
}
}
}
class Alphabet /* implement me */
{
/* implement me */
}
We all know how to use foreach, but most of us don't know how foreach works, how to make classes enumerable, or if such a thing is possible. Having to implement Alphabet means looking behind the curtain, seeing that it isn't magic, and learning how it all works.
I've been writing the quizzes myself, but I'm wondering if there aren't already blogs, sites, or books dedicated to C# and .NET quizzes like this. I know Brad Abrams posts quizzes regularly, but they're more advanced than mine, and many of them are on C# 2.0. Do you have any suggestions? Have you worked for a company that did quizzes like this?
Thanks,
Colin
01:12 PM | Colin

TrackBacks
# C# .NET Quizzes03:46 PM | you've been HAACKED
# Visual Studio Hacks: Add-in, Tool, and Macro Authors03:11 PM | .Avery Blog
# ringtones ?????????¦???????10:57 AM | ringtones
# freeringtones ?????????¦???????03:18 AM | freeringtones
# cheaptickets ?????????¦???????07:33 AM | cheaptickets
# vlJVNkfLm kzoIvcbh fsHbtEYdB [URL=http://vwkynffciahs.com/]GVXvoLFWFrds[/URL]04:54 AM | bOKyMKpzm
# americanairlines ?????????¦???????09:09 AM | americanairlines