Arguments Property

ProcessStartInfo.Arguments Property

Gets or sets the set of command line arguments to use when starting the application.

Namespace: System.Diagnostics
Assembly: System (in system.dll)

public string Arguments { get; set; }
/** @property */
public String get_Arguments ()

/** @property */
public void set_Arguments (String value)

public function get Arguments () : String

public function set Arguments (value : String)

Property Value

File type-specific arguments that the system can associate with the application specified in the FileName property. The default is an empty string (""). The maximum string length is 2,003 characters in .NET Framework applications and 488 characters in .NET Compact Framework applications.

using System;
using System.Diagnostics;
using System.ComponentModel;

namespace MyProcessSample
	/// <summary>
	/// Shell for the sample.
	/// </summary>
	class MyProcess
		/// <summary>
		/// Opens the Internet Explorer application.
		/// </summary>
		void OpenApplication(string myFavoritesPath)
			// Start Internet Explorer. Defaults to the home page.
		    // Display the contents of the favorites folder in the browser.
		/// <summary>
		/// Opens urls and .html documents using Internet Explorer.
		/// </summary>
		void OpenWithArguments()
			// url's are not considered documents. They can only be opened
			// by passing them as arguments.
			Process.Start("IExplore.exe", "");
			// Start a Web page using a browser associated with .html and .asp files.
			Process.Start("IExplore.exe", "C:\\myPath\\myFile.htm");
			Process.Start("IExplore.exe", "C:\\myPath\\myFile.asp");
		/// <summary>
		/// Uses the ProcessStartInfo class to start new processes, both in a minimized 
		/// mode.
		/// </summary>
		void OpenWithStartInfo()
			ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
			startInfo.WindowStyle = ProcessWindowStyle.Minimized;
			startInfo.Arguments = "";

		static void Main()
            		// Get the path that stores favorite links.
            		string myFavoritesPath = 
            		MyProcess myProcess = new MyProcess();


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0

Community Additions

© 2016 Microsoft