Dec 29th, 2008 | No Comments

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 http://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 http://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

Dec 22nd, 2008 | No Comments

Task list comments are a great way to remind you or others of something that still needs to be done or something that may need to be revisited for enhancement.

The task list (Ctrl-Alt-K/View.TaskList) is a handy tool that is most often used to view errors or warnings from the compilation of your code.

The task list also has another use; it can be used to leave reminders for yourself or other members of your team in comment form.

You can use this comment anywhere throughout your code, and they will show up in the task list when the file with the comment is open.

//

// TODO: Add addition logic here

//

To list this in your task list first make sure that the task list is configured to show comments, and then you will see in the task list that this comment has been added as an item.

You will see a drop-down list at the top of the task list that lets you choose what should be displayed in the task list.

You can then click on this comment and be taken to the place where you need to add code.

You can use shortcuts to step back and forth between tasks as well. The View.NextTask ( Ctrl-Shift-F12) and View.PreviousTask (no default shortcut) commands can be used to step through the tasks listed in the task list.

You can also click in the area at the top of the task list with the text “Click here to add a new task,” or  you can click the Create User Task button. This creates a user task for you and acts much like the tasks portion of Outlook. You can also tag any line in your project as a task by using the Edit.ToggleTaskListShortcut (Ctrl-K, Ctrl-H) command. Whenever you call this command, it will add a shortcut to the task list pointing to this line of code. You can then add text that says what should be done to the line of code. It is a quick and easy way to add something to the task list to tackle later on. These tasks will appear only on your system and not on the systems of your team members.

Page 3 of 912345Last »