views:

111

answers:

2

Are there any C# GOF design pattern examples? I Keep finding this site which does have examples, but the "C# Optimised" examples are only available when you purchase one of their products.

+2  A: 

There is a book called "Design Patterns in C#" by Steven John Metsker that gives examples in C# for the 23 classic GoF patterns.

Edit: On the "freely available online" side, there is a decent series on Code Project by this author.

Rob Cooke
+1. This is a good book. It was written in .Net 1.x days, at least the edition I have, so there might be a few patterns that are longer optimal (syntactically, or otherwise), but it still worth a good read.
Nathan Ernst
@Nathan Yeah, that's true. The edition I have is from 2004 and there is probably better syntax for a lot of the examples. The best use for it is probably for use in understanding the patterns by someone who is already proficient in C# rather than the other way around.
Rob Cooke
+1  A: 

I really recommend Head-First Design Patterns.

It is technically Java, but I've never looked at Java before and was completely readable for a C# developer. I checked it out from the library, only to find out that many of the .NET developers I know own it themselves already.

Jay