c# code snippets April 2, 2008Posted by fofo in .NET, C#, Visual Studio 2008.
Tags: C#, C# code snippets
I do not know about you but i love code snippets. I develop web apps using c#. Code snippets come handy most of the times.
Code snippets are reusable, task-oriented blocks of code. The range of programming tasks that you can accomplish using code snippets range from working with databases and windows applications to writing mobile device applications and networking programs.
After you install visual studio 2005 or vs 2008 the vb code snippets are installed and you can use them straight away, by right clicking in the code editor and select “Insert Snippet”.
If you use c# you need to download them from the msdn site. just click here.
Accept the license agreement and download and save the .msi file in your hard disk.
Run the .msi file and install the snippets in your hard drive. Make sure you know the path the snippets are installed.
Open Visual studio and go to Tools->Code Snippets Manager.
In the code Snippets Manager window select C# language and click the “Add” button.
then just browse to the location where the snippets were installed, select the appropriate folder and press “OK”.
Now if you go back to you code editor window(c# project) you can use these snippets.