views:

929

answers:

5

Hi!

I'm looking for some code projects/examples that would be considered really good C# code and some that would be considered really bad/spaghetti deluxe code.

All links and ideas on where to find these kinds of examples are welcome.

/P

Edit: Code snippets are always nice. But What I'm really looking for is source codes for complete projects to see the structure of the program and how they have implemented patterns etc etc...

There is a tip with some repositories that are without or with little code smells .... which is really nice. Now if we could just find some nightmare projects...

+1  A: 

Good Coding Practices

Kirtan
+2  A: 

If you want to see some bad code (though not restricted to C#) you could always visit The Daily WTF

Razzie
They seem to specialize in web languages, although they had a nice C++ example recently.
David Thornley
+5  A: 

Hi, in my understanding good is without code smells which at least conforms to SOLID acronym.

I can give you a hint look for following GOOD repositories:

- Rhino-Tools
- StructureMap
- Castle
- BuFu
- Sharp Architecture
- AutoMapper
- Tarantino

and so on, have fun :)

ruslander
Thanks! This is exactly what I was looking for - An insight into other projects that have little or no code smells.
Presidenten
+1  A: 

If you want some "organic" code, have a look at the codebases of DNN and Umbraco on Codeplex (particularly Umbraco which is written in pascal case).

I say organic not spaghetti because that would be a bit harsh, they have just evolved over years rather than being the amazing 'greenfield/blue sky, designed like a ferrari and polished like a diamond' style code like every developer aspires to and believes will happen at the start of a project.

Chris S
A: 

Take a look at this for some good code.

HavrSki