Click or drag to resize

CommandLineEscapeArgument Method

Escapes an argument string for the Windows CMD interpreter. If the string contains special cahracters or white space, it is quoted.

Namespace:  Mastersign.Bench
Assembly:  BenchLib (in BenchLib.dll) Version: 0.22.0.0 (0.22.0.0)
Syntax
public static string EscapeArgument(
	string arg,
	bool alwaysQuote = false
)

Parameters

arg
Type: SystemString
The argument string.
alwaysQuote (Optional)
Type: SystemBoolean
true if the string will be quoted regardless of quoting is necessary; otherwise false.

Return Value

Type: String
A string which can be safely passed to the CMD interpreter as an argument.
Remarks
See Also