If we talk about saving time and faster product/project development then no one will say that he/she doesn’t want to save time. All developers are intended to save time and develop their project/product beforehand and for that they use a lot of tools, techniques, patterns, code generators, helpers etc.
So, I am going to explain about Developer Assistant Visual Studio Extension which will definitely save your time.
This extension provides you the code sample (code snippet) inside the visual Studio Code Editor itself so you do not need to go to your browser and then search something in browser.
So here you are saving the time,
- Time taken to switch from Visual Studio Editor code window to your browser.
- Type or paste text in browser & search it.
- Going through the links of few search results.
Let’s see how it works. It’s not magic but uses Bing search behind the scene. It sends some code samples and returns the code snippet for us. But we have nothing to do for all these things it happens automatically in background.
To use this feature we can install this extension from “Extensions and Updates” that can open from Tools menu of Visual Studio.
In search box type “developer assistant” inside online template and you will find the result in which it will display “Developer Assistant”.
Click on Download button to download it & then install it. It will ask to restart Visual studio, restart it.
Now to test how it works just open a console application inside Visual Studio 2015 (I am using the latest version of Visual studio but you can use this feature with VS 2013, VS 2012 and other versions too).
Inside the static void Main() method just write Console.WriteLine & String.Format and you can refer to the following two images for how it is displaying the help.
Apart from this you can do a lot of things. Refe to the below image for details,
- You can vote up or vote down the displayed code sample & copy the complete code snippet.
- Search for more code samples.
- A new search box integrated inside your Visual studio.
- You can use pin/unpin & docking behavior of this window.
- You can also resize developer assistant window.
- You can collapse/expand the code sample. You can see it is displaying “powered by Bing”.
- If you refer the 7th point in the above image you will find that it is having a context menu “How do I” you can click on that to open “How do I” window. You can also use the shortcut (Ctrl+Shift+F1).
- Apart from this it also displays the URL from where it is displaying the result.
You can also use its contextual search feature.
One more interesting feature is it local code search. It searches the code sample from your local machine too.
Searching Sample code from your local Machine
Add a new class and inside that class add the following code sample.
- class Class1
- {
- public static int Id
- {
- get;
- } = 101;
- public static string Name
- {
- get;
- set;
- }
- public static int Age
- {
- get;
- set;
- }
- string details = String.Format("Id: '{0}' Name: '{1}' Age: '{2}'", Id, Name, Age);
- }
Now go to your program class and write
String.Format now you find your local code too in that code sample.
Apart from this it contains 20-30 more features but I am not explaining all those features here. If you install it you can find all those features very easily. It’s a very helpful Visual Studio extension.
Before this article I have written a few more articles on time saving and faster development using Visual Studio extensions. If you wish you can go through the following links for those articles:
- XML Documentation Comments using GhostDoc
- Align Your Code With Align Assignments Visual Studio Extension
- Check-out Files in Visual Studio 2015 TFS Modified from Outside