.NET Zone is brought to you in partnership with:

I’ve been a Windows developer since 3.0 and caught the Visual Basic wave early with v1. I’ve released a “production” application in every version of VB since then (except VB for DOS). Focusing on enterprise, line-of-business development I’ve built Call Center Applications, Mortgage finance systems, Customer Relationship Management tools and more recently I’ve been in the Litigation Support/Electronic Data Discovery/Electronically Stored Information space. Greg is a DZone MVB and is not an employee of DZone and has posted 476 posts at DZone. You can read more from them at their website. View Full User Profile

Bing Your IDE to This New C# Code Search Visual Studio Extension (from Bing)

02.26.2014
| 1952 views |
  • submit to reddit

The Visual Studio Blog - Introducing Bing Code Search for C#

Imagine wanting to read a file line by line, and process those lines. Today, we’d most likely load up a web browser, visit our favorite search engine, and start crafting a well-designed set of keywords that helps the search engine understand the problem we’re trying to solve.

In the ideal case, we’d find high quality official documentation with examples, or a highly voted-on topic from one of the major forums or crowd sourced Q&A web sites. We would then scan through the options, try to figure out what’s relevant to us and do some copy/paste magic.

We wanted this to be become more accessible and make finding relevant code samples for the given tasks you’re trying to complete far easier.

Making it better

We wanted to make that experience better for you. To that end, Visual Studio, Bing and Microsoft Research have teamed up to deliver a DevLabs experience that takes code search to the next level.

When you find yourself looking for a code-sample that you could leverage for a task, you can trigger the new Bing Code Search experience directly from IntelliSense.

image

Behind the scenes, that query is securely beamed up to Bing along with contextual pieces that help us hone in on the fuller meaning of that query. We use meta-data like the project type, semantic context (using the new C#/VB compiler services aka ‘Roslyn’!), and a few other sprinkles of Microsoft Research magic.

Those pieces along with the query then leverage Bing’s enormous search index and keyword analysis to track down potential pages that might contain high quality examples you can learn from.

From those pages, we isolate and rank the relevant code samples, using a large number of syntactic and semantic code metrics.

...

Visual Studio Gallery - Bing Code Search for C#

...[Try it out Online ]

The Bing Code Search add-in for Visual Studio 2013 makes it easier for .NET developers to search for and reuse code samples from across the coding community, including MSDN,StackOverflowDotnetperls and CSharp411.

Bing Code Search improves developer productivity and speed by bringing the experience of searching for reusable C# code into Visual Studio IDE.

Check out this demo video for more info

Got to love the DevLabs and some of the stuff they throw over the wall to us. Now I'm not going to comment on "Google Bing Coding" as without that my day would be much less productive! But I do wonder if there's a lack of context in using this? So many answers provide more than just code...

Published at DZone with permission of Greg Duncan, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)