C# stacks without libraries

Been having a bit of fun last night. A job I’ve applied for needs a code sample – fine. What they’ve asked for is the implementation of a Stack class in C# – fine. Two of the conditions though are:

  • Important: Do not use or reference the namespaces “System.Collections” and “System.Collections.Generic” or any element contained in them.
  • Consider making your implementation as versatile as possible while staying typesafe.

You know, System.Collections, is that namespace that contains and implements Stacks. And, to be typesafe, generics would be the obvious use-case solution. I’ve had a bit of fun, and that’s all sorted now. Kinda cool actually, having to get right back to nothing and build something that we take for granted in daily coding.

I will post the code here as an edit in a few weeks time. Just going to wait until the process is over; a) so I don’t give it away to other applicants, and b) so I don’t get in any trouble with whoever the company is. Especially as some people have tried to get it answered for them online (here and here).


About Cameron
I'm a final year Computer Science/Information Systems major. Already finished my BA in Politics/Philosophy. I do web and software freelance on the side, while I finish studying. Hoping to be self-employed by the end of my degree, otherwise off into the real-world I go....

One Response to C# stacks without libraries

  1. Pingback: Tweets that mention C# stacks without libraries « whileloop -- Topsy.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: