The best way to find out sample codes is using API help. open the file apihelp.chm and type C# , scroll through the list and you should see plenty of examples.
If you have access to online API help, then google for specific topic that you are looking for and it shows quite good results. Eg: "Get Chamfer Dimension SolidWorks API"
I also record macros and look out for API's that i cannot otherwise find using help.