Maximizing the value of IntelliCode with API usage examples: Real-World Code Examples at Your Fingertips
As a software developer, we’ve all faced the frustration of having to leave our IDE to search for documentation, code examples, Stack Overflow, blog posts or simply trying to remember how to use a certain API. What if we told you that we have a solution for you? Now with Visual Studio 17.6 Preview, IntelliCode makes finding real-world code examples for common APIs easier than ever. With this feature, you’ll have real examples at your fingertips. See how an API has been used in real-world projects. Saving you time and making your coding even more efficient.
Under your fingertips
IntelliCode API usage examples enables you to browse open-source code examples of 100k common APIs. These code snippets represent real-world usage examples that are sourced in public GitHub repositories. Now you have these examples under your fingertips. When you hover over a known API, the documentation shows a link to start browsing examples.
How it works
When you hover over a method, IntelliCode checks for matching examples in its database. A link is displayed which opens a tab with examples. In this tab you can browse snippets and access documentation. On the snippet you can click through to the source-code on GitHub.
The IntelliCode API usage examples helps you to understand how a function works in real code. This enables you to use them in your project more effectively, by providing examples of how a function can be used from within the editor. No more searching for examples on the internet. However, it’s important to note that the code snippets provided by the IntelliCode are only examples and may not be the best or most up-to-date way to use a function in all cases.
Overall, the this is a useful addition to the IntelliCode features to help you write better code more efficiently. It’s currently in public preview in Visual Studio. Install Visual Studio 17.6 Preview today and try it out! We’d love your feedback! If you run into an issue, in Visual Studio, use Help | Send Feedback to report a problem. Let us know what you think!