Google Code Search
I was looking earlier today for some sort of code implementation as I was just too lazy to code it myself... then I remembered about google code search ...
After 20 seconds I had some kind of implementation in my hand and yep I also looked at the license to see that its royalty free :-)
P.S. small tip... use the advance search to limit to search to C# or whatever.