dcsimg
Results 1 to 3 of 3

Thread: Pass args with values to Console App

  1. #1

    Thread Starter
    Hyperactive Member Cyb3rH4Xter's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    449

    Pass args with values to Console App

    If i pass this argument:

    -helloworld

    I can get it easily.

    But how do I do if i want to get this line as 1 argument or something:

    -writethis "Hello Guys!"

    I have only suceeded with retrieving it as 2 separate args (writethis, "hello Guys")

  2. #2
    Hyperactive Member BadgerBadger's Avatar
    Join Date
    Aug 2009
    Location
    Wales
    Posts
    382

    Re: Pass args with values to Console App

    Loop through the arguments and find the position of "-writethis". The position for the arg after that would be args(writethis_pos + 1).
    "The only thing that interferes with my learning is my education."

  3. #3

    Thread Starter
    Hyperactive Member Cyb3rH4Xter's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    449

    Re: Pass args with values to Console App

    of course thx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width