From Visual Studio 2022 17.6 we’ll be able to see real world examples of common .NET APIs on GitHub direct in the IDE.
In the example below I’ve moused over the Range method and selected ‘GitHub Examples and Documentation (Ctrl+Alt+#)‘ to see examples from GitHub on the right hand side.
There is a very convenient copy code block button too.
Click on the image for a larger view in a new window.