i need to parse an argument to a string and it contains spaces so this is what i did:
search.exe "/SASE Lab Tools"
so now i declared this as a string:
string type = string.Format("{0}", args[0]);
then,
i need to do this:
p.StartInfo.Arguments = "-R -H -h sinsscm01.ds.net " + type;
but my result contains spaces in my p.StartInfo.Arguments.
when what i need for my output for p.StartInfo.Arguments is:
-R -H -h sinsscm01.ds.jdsu.net "/SASE Lab Tools"
how do i add " " into my code?
You need to include them in your format string, e.g.
Or just use concatenation:
Currently your format string is effectively just doing: