1
Is there a way to document DialogResult values for a Windows Form
Question asked by Mike Lusicic - 7/21/2021 at 9:11 AM
Unanswered
I have Windows forms that set the DialogResult that is returned when invoking it with a ShowDialog method. I am trying to figure out how to do this. It will not allow a Return tag for a form class. When I try to use a <Remark> the <List> tag does not seem to work to itemize the values returned.

3 Replies

Reply to Thread
0
Misha Zhutov Replied
Employee Post
Hi Mike,

Please provide us with a code snippet and send it to support@submain.com

0
Mike Lusicic Replied
The form is called MessageHelp. I used the Comment Editor to build help with a <Returns> tag. After I saved, I get:

'''<Summary>
''' This form shows and allows editing of the <see cref="HelpMessage">Help Message</see> object.
'''<Returns>
'''   <para>This form will return a <see cref="system.windows.forms.dialogresult">DialogResult</see>
'''      value as follows:</para>
'''    <list type="bullet">
'''       <item>OK indicates a normal exit of the form after updating the object.</item>
'''       <item>Cancel indicates an Add for the object was canceled.</item>
'''       <item>Ignore indicates a normal exit of the form without updating the object.</item>
'''    </list>
'''</returns>

The <Returns> tag is shown in error as:
XML comment tag 'returns' is not permitted on a 'class' language element.

I presume this is a limitation in VS itself since it is a method of the class (ShowDialog) that
returns the object. However, there is no ShowDialog code I can attach any return
documentation to. So my question is how do I document this?

The only way I can figure out is to use <Remarks>, but that seems less than optimal.
0
Misha Zhutov Replied
Employee Post
Could you please provide us with a class declaration?

Reply to Thread