{"id":240964,"date":"2023-02-22T08:00:45","date_gmt":"2023-02-22T16:00:45","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=240964"},"modified":"2023-02-21T13:25:29","modified_gmt":"2023-02-21T21:25:29","slug":"intellicode-api-usage-examples","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/intellicode-api-usage-examples\/","title":{"rendered":"Maximizing the value of IntelliCode with API usage examples: Real-World Code Examples at Your Fingertips"},"content":{"rendered":"<p>As a software developer, we&#8217;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 <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\">Visual Studio 17.6 Preview<\/a>, IntelliCode makes finding real-world code examples for common APIs easier than ever. With this feature, you&#8217;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.<\/p>\n<h2>Under your fingertips<\/h2>\n<p>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.<\/p>\n<p><img decoding=\"async\" class=\"alignnone \" src=\"https:\/\/aka.ms\/IntelliCodeUsageExamplesVisualStudio\" width=\"1150\" height=\"600\" \/><\/p>\n<h2>How it works<\/h2>\n<p>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.<\/p>\n<p>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&#8217;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.<\/p>\n<h2>Feedback<\/h2>\n<p>Overall, the this is a useful addition to the IntelliCode features to help you write better code more efficiently. It\u2019s currently in public preview in Visual Studio. <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\">Install Visual Studio 17.6 Preview<\/a> today and try it out! We\u2019d 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!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a software developer, we&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":11554,"featured_media":241294,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[1055,5,6839,467],"class_list":["post-240964","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-ai","tag-csharp","tag-developer-productivity","tag-intellicode"],"acf":[],"blog_post_summary":"<p>As a software developer, we&#8217;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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/240964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/11554"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=240964"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/240964\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/241294"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=240964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=240964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=240964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}