Code reference hyperlinks in Visual Studio 2015

Visual Studio 2015 allows you to create links to classes and method in other files from a comment in your C# code:

When the cursor is inside the cref attribute, pressing F12 or selecting Go To Definition opens the corresponding file with the referenced method.

When typing the referenced class or method, IntelliSense autocomplete is available. You can specify an external namespace for the target if needed. The Go To Definition command works with any tag name (e.g. <a>), but for proper XML documentation it is recommended to use <see> or <seealso>.

(This feature was first described by Peter Macej here).

This entry was posted in Visual Studio tips and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s