Robust Application Development in Visual Studio 2005
Well , VS2005 is one of the most “Expensive” and “Sexy is what i call it” IDE for doing development in MS Technologies. It makes the life of a developer very easy. With tons of features that have been given to developer to do Robust Application development. While Randomly writing 100′s of lines at work i realized a fact that there is a lot of copy paste stuff we do usually ! and the cost of Search + CTRL_C + Getting Back + CTRL_V increased Exponentially if you dont remeber where the last time you wrote the line of code that you want back “Typically happens when you are not fully aware of the project” and usually happens with me I forgot what i code most of the time for that i wanted to put my comments where ever i make changes Lets say there is a function called GetLostWorld() and i have to change its functionallity so i usually mark a comment on it for record of others that i have messed up here i.e.
void GetLostWorld() {
console.writeline(“Get Lost world”);
}
Now if i make changes to it i would typically mark my comments so that it would be convinent for me to get back and see what happened i.e.
/// <summary>
/// <Author> Azeem </Author>
///
I wonder if i could change the way Comments being put in C# There are couple of work around for doing that one is to change the rendering of XML Comment which i am not fortunate enough to find. There is some xml file that would do the work in vB however i wasn’t able to find out a way to do that in C#.
So i did a little bit of googling and found out about snippets they are way cool ! Checkout this web if you want to know how to tackle snippets an example of for snippet is given below
<?xml version=”1.0″ encoding=”utf-8″ ?>
<CodeSnippets xmlns=”http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet”>
<CodeSnippet Format=”1.0.0″>
<Header>
<Title>for</Title>
<Shortcut>for</Shortcut>
<Description>Code snippet for ‘for’ loop</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>index</ID>
<Default>i</Default>
<ToolTip>Index</ToolTip>
</Literal>
<Literal>
<ID>max</ID>
<Default>length</Default>
<ToolTip>Max length</ToolTip>
</Literal>
</Declarations>
<Code Language=”csharp”><![CDATA[for (int $index$ = 0; $index$ < $max$; $index$++)
{
$selected$ $end$
}]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
It comes up with VS 2005 one can create unlimited number of snippets with respect to project he/she is doing. Every one should explore this thing out i bet there would be a marginal number of key stroke optimization can be obtained by making 5 to 10 snippets as per the project of your requires..




[...] This cup of tea was served by: Azeem Personal play ground [...]
Robust Application Development in Visual Studio 2005 | Tea Break said this on September 14, 2008 at 7:32 pm |