0

XML comments do not show up when an object instance is defined using WithEvents; however, comments will show up for everything else. How do I resolve this?


EDIT

''' <summary>
''' Represents a <see cref="System.Windows.Forms.Button"/> control that when clicked displays the associated <see cref="System.Windows.Forms.CheckBox"/> controls which the user can use to toggle elements.
''' </summary>
Public WithEvents DropDownButton As New System.Windows.Forms.Button

Source Image: enter image description here Image from new project using the code: enter image description here

13
  • DO NOT post only pictures of code. Post the code as text, formatted as code. If a screenshot provides value then post it too but ALWAYS post the code as text. Commented Aug 25, 2021 at 14:18
  • Why would you care about the XML documentation for the field when mousing over the field declaration? You've got the documentation right there. It's when using the elsewhere in code that it matters. Does it show then? The screenshot doesn't indicate that you've actually checked that. Commented Aug 25, 2021 at 14:22
  • Exposing your fields publicly is bad practice anyway. You really ought to be declaring those fields Private and, if you need to expose them publicly, do so via a Public property. If there actually is an issue with fields declared WithEvents, it will be a moot point because the XML documentation will be on the property anyway. Commented Aug 25, 2021 at 14:23
  • 1
    Like I said, including a screenshot is fine if it adds value, but that doesn't mean that you shouldn't post the code as text. We can't copy code from a picture and paste it into VS to test it for ourselves. The same goes for error message, i.e. post a screenshot if it adds value but ALWAYS post the text first. Commented Aug 25, 2021 at 14:29
  • 1
    The default behavior for WithEvents Fields (which should not be exposed) is to add an underscore in the XML documentation, before the F:Name descriptor, so it does not appear. -- Remove WithEvents, this doesn't really look like it's as an object handled by the Designer. Commented Aug 25, 2021 at 15:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.