Feb
20
Published Thursday, February 20, 2014 at 9:13 AM in Development
As a developer it’s very common to “google” for code samples, when you’re set out to write code that you have either forgotten or if you’re not quite sure how something works. I always use Google for this, because I believe they have the best results. And frankly because I haven’t given Bing a fair chance.
Now, Microsoft has released a new extension for Visual Studio 2013; Bing Code Search for C#. The extension does exactly what its name implies. But, it does it in a fashion that is incredibly clever. Your search result is displayed inside Visual Studio and it only shows the working Code Sample, as opposed to Google, where you have to pick out several results. Or when searching StackOverflow.com where it’s very likely that 10 people answer the same question with variations of the same answer.
Here’s how it works.
Install the extension from the Visual Studio Gallery.

Click on the Bing Logo and the text “How do I …”.

Enter your query in the search field.

In this example I got 8 results, which I can browse between. Click on the Accept-button to insert the script to your code file.

Beautiful, Microsoft!