Can I add links in comments to a code block in Visual studio ?
For example:
// block 1
class class1
{
}
// block 2
class class2
{
// review [___class1]
}
[___class1] is a link for class1
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can bookmark your code in Visual Studio, but that’s stored in your user options file and isn’t normally checked into source control. I don’t know of a way to link to portions of code from other portions of code.
Your best bet might be to use document comments and a
<see>tag:But that’s going to be limited to fully qualified locations, i.e. types, methods, fields, and properties. A particular block (say, an
ifstatement within a method) is right out, and it’ll only link the documentation for that method/whatever to another documentation section, and then only if you generate the documentation using a tool like Sandcastle.One other thing you might consider, and this is a very bad hack, is to use file hyperlinks, like so:
There are caveats:
directly to your code, and won’t work if you remap your source repository to another
location