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 you 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 for something in the browser.
So here you are saving time.
- Time taken to switch from Visual Studio Editor code window to your browser.
- Type or paste text in the browser & search it.
- Going through the links of a few search results.
Let’s see how it works. It’s not magic but uses Bing search behind the scenes. It sends some code samples and returns the code snippet for us. But we have nothing to do with all these things it happens automatically in the background.
To use this feature we can install this extension from “Extensions and Updates” which can open from the Tools menu of Visual Studio.
In the search box type “developer assistant” inside an online template and you will find the result in which it will display “Developer Assistant”.
Click on the 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. Refer 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 the pin/unpin & docking behavior of this window.
- You can also resize the developer assistant window.
- You can collapse/expand the code sample. You can see it is displaying “powered by Bing”.
- If you refer to the 7th point in the above image you will find that it has a context menu “How do I” You can click on that to open the “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 its 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