| 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
)
Public Shared Function EscapeArgument (
arg As String,
Optional alwaysQuote As Boolean = false
) As String
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:
StringA string which can be safely passed to the CMD interpreter as an argument.
Remarks See Also