This may be a simple thing but in VB2010 I like to place my sources in the routine comments. Some URLs have embedded ampersands and this gets marked as a warning by the IDE.
''' <summary>
''' routine that creates a new file based on a definition query.
''' </summary>
''' <param name="newLoc"></param>
''' <returns></returns>
''' <remarks>
''' http://forums.esri.com/Thread.asp?c=93&f=992&t=194920#580036
''' http://forums.esri.com/Thread.asp?c=93&f=992&t=155005#452664
''' </remarks>
Public Function DoSelectLoc(ByVal newLoc As NewLocation) As Boolean
'my routine
End Function
The two URLs above get marked with a warning. I've tried several alternate ways to write the URL but none have worked. I've tried the HTML code &
but that still has the ampersand. I know the IDE uses XML for the comments but there must be some way to write the URL without getting the warning and still keeping the same referenced link.
Update: Based on the discussion here http://social.msdn.microsoft.com/Forums/en-US/f14e7b55-c352-4ca5-a82c-bca3b83818db/double-ampersand-in-a-code-comment-causes-intellisense-error I decided to use the CDDATA to encapsulate my URLs like so:
''' <remarks>
''' <![CDATA[
''' http://forums.esri.com/Thread.asp?c=93&f=992&t=194920#580036
''' http://forums.esri.com/Thread.asp?c=93&f=992&t=155005#452664
''' ]]>
''' </remarks>
Seems to work to allow the links to work properly and also to not trip the Visual Studio warning.
The right XML syntax is &
i.e.
''' <remarks>
''' http://forums.esri.com/Thread.asp?c=93&f=992&t=194920#580036
''' http://forums.esri.com/Thread.asp?c=93&f=992&t=155005#452664
''' </remarks>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With