How to pass special character to a process argument

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bassem
    Contributor
    • Dec 2008
    • 344

    #1

    How to pass special character to a process argument

    Hello,

    How can I pass ":" or " " as an argument to a process?

    I start a process which takes an IP and port number (ex 222.240.224.131 :80) as argument. Another character that I want to pass is white space character. Both of these characters cuts the argument string and sends only the part that leads them.

    Thanks,
    Bassem
  • Bassem
    Contributor
    • Dec 2008
    • 344

    #2
    I found the solution: Warping the argument with quotations.
    Code:
    myProcess.Argument = "\"" + myArgument + "\"";
    Hoping this would help someone.

    Thanks,
    Bassem

    Comment

    Working...