Looking for C# and VB code samples?


Look what I just found: 101 Visual Basic and C# Code Samples. The www has lots of great things out there and sometimes we can’t know about all of them. I have ended finding many good code samples by accident and I am always happy to find them; it’s almost as good as when you find money in the pocket of a jacket you haven’t used in a while.


An interesting thing of developing Office applications using managed code is that you always need knowledge of how to work with multiple .NET assemblies to accomplish different tasks. Even if you are a great developer and already know a bunch of classes, it always comes handy to learn best practices. Here is a list of some code samples you can find in there:



  1. Advanced .NET Framework (Localization) – Work with Resource Files
  2. File – How-To File System
  3. Framework – Creating an Enterprise Services Component
  4. Framework – How-To Configuration Settings
  5. Framework – How-To Work with XML
  6. Framework – Understanding the Garbage Collector
  7. NET Framework – How-To Send Mail
  8. Web Services – Consume a Web Service
  9. Windows Forms – How-To Automate Office
  10. Windows Forms – Use Regular Expressions

…and more, in fact 101 great code samples that are good to keep in your jacket’s pocket.

Comments (6)

  1. imtiyaz says:

    … and Visual C++ .NET 2003 Code Samples

    http://www.microsoft.com/downloads/details.aspx?FamilyID=6e6fac4b-5b51-41fe-9604-1d9752e8a71a&displaylang=en

    This set of samples for Visual C++ 2003 contains 75 high quality example projects. Subjects covered in the samples include working with strings, role-based security, regular expressions, Windows Forms and much more.

  2. Kartik says:

    Hi,

    I need help writing a c# 2005 application which can get a particular web page from the internet, fill values on it, and press the submit button, get the response and download it.

    I have tried Google but I don’t know the exact keywords to define the above, so I am unable to search fruitfully.

    Any help would be appreciated.

  3. ffeitas says:

    Hi, I need to programatically convert office XP and 2003 documents to Office 2007. How can I accomplish that?

    Thanks in advance!

    Fernando.

  4. ashfaque says:

    how to convert .docx file  data into binary to store in sql database and viceversa ?

  5. Amil says:

    Here is a great C# API to convert Excel 2007 docs to an XML document for further processing.

    http://steedstud.blogspot.com/2009/01/converting-office-2007-excel-to-xml.html