You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Diagnostics/Process.xml
+8-10Lines changed: 8 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1629,7 +1629,7 @@ The following code example creates a process that prints a file. It sets the <xr
1629
1629
<exception cref="T:System.ArgumentException">The <paramref name="machineName" /> parameter syntax is invalid. It might have length zero (0).</exception>
1630
1630
<exception cref="T:System.ArgumentNullException">The <paramref name="machineName" /> parameter is <see langword="null" />.</exception>
1631
1631
<exception cref="T:System.PlatformNotSupportedException">The operating system platform does not support this operation on remote computers.</exception>
1632
-
<exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter API's used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
1632
+
<exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter APIs used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
1633
1633
<exception cref="T:System.ComponentModel.Win32Exception">A problem occurred accessing an underlying system API.</exception>
@@ -1711,7 +1711,7 @@ The following code example creates a process that prints a file. It sets the <xr
1711
1711
1712
1712
]]></format>
1713
1713
</remarks>
1714
-
<exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter API's used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
1714
+
<exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter APIs used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
@@ -1795,7 +1795,7 @@ The following code example creates a process that prints a file. It sets the <xr
1795
1795
1796
1796
-or-
1797
1797
1798
-
There are problems accessing the performance counter API's used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
1798
+
There are problems accessing the performance counter APIs used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
1799
1799
<exception cref="T:System.ComponentModel.Win32Exception">A problem occurred accessing an underlying system API.</exception>
@@ -2228,9 +2228,9 @@ You cannot cause processes on remote computers to exit. You can only view inform
2228
2228
<exception cref="T:System.NotSupportedException">You are attempting to call <see cref="M:System.Diagnostics.Process.Kill" /> for a process that is running on a remote computer. The method is available only for processes running on the local computer.</exception>
2229
2229
<exception cref="T:System.InvalidOperationException">The process has already exited.
2230
2230
2231
-
-or-
2232
-
2233
-
There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object.
2231
+
-or-
2232
+
2233
+
There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object.
2234
2234
2235
2235
-or-
2236
2236
@@ -5367,9 +5367,7 @@ The file specified in the <paramref name="fileName" /> could not be found.
5367
5367
5368
5368
You should only access the <xref:System.Diagnostics.Process.StartInfo%2A> property on a <xref:System.Diagnostics.Process> object returned by the <xref:System.Diagnostics.Process.Start%2A> method. For example, you should not access the <xref:System.Diagnostics.Process.StartInfo%2A> property on a <xref:System.Diagnostics.Process> object returned by <xref:System.Diagnostics.Process.GetProcesses%2A>. Otherwise, on .NET Core the <xref:System.Diagnostics.Process.StartInfo%2A> property will throw an <xref:System.InvalidOperationException> and on .NET Framework it will return a dummy <xref:System.Diagnostics.ProcessStartInfo> object.
5369
5369
5370
-
When the process is started, the file name is the file that populates the (read-only) <xref:System.Diagnostics.Process.MainModule%2A> property. If you want to retrieve the executable file that is associated with the process after the process has started, use the <xref:System.Diagnostics.Process.MainModule%2A> property. If you want to set the executable file of a <xref:System.Diagnostics.Process> instance for which an associated process has not been started, use the <xref:System.Diagnostics.Process.StartInfo%2A> property's <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> member. Because the members of the <xref:System.Diagnostics.Process.StartInfo%2A> property are arguments that are passed to the <xref:System.Diagnostics.Process.Start%2A> method of a process, changing the <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> property after the associated process has started will not reset the <xref:System.Diagnostics.Process.MainModule%2A> property. These properties are used only to initialize the associated process.
5371
-
5372
-
5370
+
When the process is started, the file name is the file that populates the (read-only) <xref:System.Diagnostics.Process.MainModule%2A> property. If you want to retrieve the executable file that is associated with the process after the process has started, use the <xref:System.Diagnostics.Process.MainModule%2A> property. If you want to set the executable file of a <xref:System.Diagnostics.Process> instance for which an associated process has not been started, use the <xref:System.Diagnostics.Process.StartInfo%2A> property's <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> member. Because the members of the <xref:System.Diagnostics.Process.StartInfo%2A> property are arguments that are passed to the <xref:System.Diagnostics.Process.Start%2A> method of a process, changing the <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> property after the associated process has started will not reset the <xref:System.Diagnostics.Process.MainModule%2A> property. These properties are used only to initialize the associated process.
5373
5371
5374
5372
## Examples
5375
5373
The following example populates a <xref:System.Diagnostics.Process.StartInfo%2A> with the file to execute, the action performed on it and whether it should displays a user interface. For additional examples, refer to the reference pages for properties of the <xref:System.Diagnostics.ProcessStartInfo> class.
@@ -5381,7 +5379,7 @@ The file specified in the <paramref name="fileName" /> could not be found.
5381
5379
]]></format>
5382
5380
</remarks>
5383
5381
<exception cref="T:System.ArgumentNullException">The value that specifies the <see cref="P:System.Diagnostics.Process.StartInfo" /> is <see langword="null" />.</exception>
5384
-
<exception cref="T:System.InvalidOperationException">The <see cref="M:System.Diagnostics.Process.Start" /> method was not used to start the process.</exception>
5382
+
<exception cref="T:System.InvalidOperationException">.NET Core only: The <see cref="M:System.Diagnostics.Process.Start" /> method was not used to start the process.</exception>
0 commit comments