Skip to content

Commit 26cfd3f

Browse files
kierenjjozkee
andauthored
Clarify Process.HasExited and that it raises Exited (#8379)
* Clarify Process.HasExited and the it raises Exited The existing description implied that the Exited event could be raised "before" the user calls HasExited. This wasn't very clear in my opinion - so I've suggested a tweak to make it more explicit by revealing that the HasExited property accessor itself has a side-effect; invoking HasExited if the process has exited. * Update xml/System.Diagnostics/Process.xml Co-authored-by: David Cantú <[email protected]>
1 parent d150267 commit 26cfd3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Diagnostics/Process.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ process.BeginOutputReadLine();
927927
<Docs>
928928
<summary>Gets or sets whether the <see cref="E:System.Diagnostics.Process.Exited" /> event should be raised when the process terminates.</summary>
929929
<value>
930-
<see langword="true" /> if the <see cref="E:System.Diagnostics.Process.Exited" /> event should be raised when the associated process is terminated (through either an exit or a call to <see cref="M:System.Diagnostics.Process.Kill" />); otherwise, <see langword="false" />. The default is <see langword="false" />. Note that the <see cref="E:System.Diagnostics.Process.Exited" /> event is raised even if the value of <see cref="P:System.Diagnostics.Process.EnableRaisingEvents" /> is <see langword="false" /> when the process exits during or before the user performs a <see cref="P:System.Diagnostics.Process.HasExited" /> check.</value>
930+
<see langword="true" /> if the <see cref="E:System.Diagnostics.Process.Exited" /> event should be raised when the associated process is terminated (through either an exit or a call to <see cref="M:System.Diagnostics.Process.Kill" />); otherwise, <see langword="false" />. The default is <see langword="false" />. Note that even if the value of <see cref="P:System.Diagnostics.Process.EnableRaisingEvents" /> is <see langword="false" />, the <see cref="E:System.Diagnostics.Process.Exited" /> event will be raised by the <see cref="P:System.Diagnostics.Process.HasExited" /> property accessor, if it determines that the process has exited.</value>
931931
<remarks>
932932
<format type="text/markdown"><![CDATA[
933933

0 commit comments

Comments
 (0)