Posts Insert Code Snippet – Tip Of Week #15
Post
Cancel

Insert Code Snippet – Tip Of Week #15

Hi guys, do you know you can use already ready code inside your visual studio? Yes certainly you can insert code snippets into your code. You can invoke the “Insert Snippet” by using shortcut “ctrl k + ctrl x”.

snippet

You can download some of the code snippets from https://msdn.microsoft.com/en-us/vstudio/aa718338.aspx all you need to do is install this file at “My Documents\Visual Studio 2008\Code Snippets\Visual C#\My Code Snippets” location. You can also find some more snippets at https://www.codeplex.com/snippetlibcsharp/Release/ProjectReleases.aspx?ReleaseId=14841 all you need to do is copy this snippet at “My Documents\Visual Studio 2008\Code Snippets\Visual C#\My Code Snippets” and you are ready to use these ready made code into your visual studio using shortcuts “ctrl k + ctrl x”

You can also insert the snippets by writing a part of it and pressing tab twice. For e.g. to insert a new property in your code type

prop + tab + tab

this will insert a property in your code window.

So keep using this to improve your productivity, and enjoy coding.

:Ajay Matharu

This post is licensed under CC BY 4.0 by the author.