Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Passing parameters from Other Application to .Net

Passing parameters from Other Application to .Net

Scheduled Pinned Locked Moved C#
csharpxmlquestion
10 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shahzad Aslam
    wrote on last edited by
    #1

    Hi, I have console based application which send request by using httpwebrequest method and save the response in XML file. I need to accept parameters from other application which is not in .Net. Is it possible to build batch file that accept arguments from other application and then pass it to .Net console based application? Thanks, Shahzad

    OriginalGriffO 1 Reply Last reply
    0
    • S Shahzad Aslam

      Hi, I have console based application which send request by using httpwebrequest method and save the response in XML file. I need to accept parameters from other application which is not in .Net. Is it possible to build batch file that accept arguments from other application and then pass it to .Net console based application? Thanks, Shahzad

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      Every .NET (and indeed windows) application can have arguments - see the "args" parameter to your "main" method. When your external app starts your console app. it can provide the parameters as part of the command line.

      Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      S 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        Every .NET (and indeed windows) application can have arguments - see the "args" parameter to your "main" method. When your external app starts your console app. it can provide the parameters as part of the command line.

        Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

        S Offline
        S Offline
        Shahzad Aslam
        wrote on last edited by
        #3

        If I have to test it through batch file then how I will pass the arguments and also invoke the .Exe file, can you provide a sample?

        OriginalGriffO 1 Reply Last reply
        0
        • S Shahzad Aslam

          If I have to test it through batch file then how I will pass the arguments and also invoke the .Exe file, can you provide a sample?

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          You are joking, aren't you? He said, having a horrible feeling you aren't

          Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          P 1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            You are joking, aren't you? He said, having a horrible feeling you aren't

            Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            As he deleted the original posts, we'll never know.

            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

            My blog | My articles | MoXAML PowerToys | Onyx

            OriginalGriffO 1 Reply Last reply
            0
            • P Pete OHanlon

              As he deleted the original posts, we'll never know.

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              OriginalGriffO Offline
              OriginalGriffO Offline
              OriginalGriff
              wrote on last edited by
              #6

              The last message he delete was "Yes i am..." Which I think translates into "no, i really am that in-experienced..." Four years he's been here, and claims to be a senior software developer - it make you wonder where he got his educational certificates! :sigh:

              Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

              T S 2 Replies Last reply
              0
              • OriginalGriffO OriginalGriff

                The last message he delete was "Yes i am..." Which I think translates into "no, i really am that in-experienced..." Four years he's been here, and claims to be a senior software developer - it make you wonder where he got his educational certificates! :sigh:

                Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

                T Offline
                T Offline
                T M Gray
                wrote on last edited by
                #7

                Boxtops my friend. Eat enough Progammer Os and Developer Flakes and for just postage and handling you can be certified in software engineering. ;P

                OriginalGriffO 1 Reply Last reply
                0
                • T T M Gray

                  Boxtops my friend. Eat enough Progammer Os and Developer Flakes and for just postage and handling you can be certified in software engineering. ;P

                  OriginalGriffO Offline
                  OriginalGriffO Offline
                  OriginalGriff
                  wrote on last edited by
                  #8

                  I thought it was only Driving Licenses you could get from a Christmas cracker! :laugh:

                  Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

                  "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                  "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                  1 Reply Last reply
                  0
                  • OriginalGriffO OriginalGriff

                    The last message he delete was "Yes i am..." Which I think translates into "no, i really am that in-experienced..." Four years he's been here, and claims to be a senior software developer - it make you wonder where he got his educational certificates! :sigh:

                    Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

                    S Offline
                    S Offline
                    Shahzad Aslam
                    wrote on last edited by
                    #9

                    @OriginalGriff: Dont be jealous. Also show the previous posts... The thing is you don't know the answer and I am done with my task.

                    D 1 Reply Last reply
                    0
                    • S Shahzad Aslam

                      @OriginalGriff: Dont be jealous. Also show the previous posts... The thing is you don't know the answer and I am done with my task.

                      D Offline
                      D Offline
                      DaveyM69
                      wrote on last edited by
                      #10

                      But you apparently know the answer - instead of sharing you deleted the question so now we have this pointless thread on the forum. If you hadn't deleted the question and had posted the solution you found then many others in the future may have benefited. This is what the CodeProject community is all about.

                      Dave

                      If this helped, please vote & accept answer!

                      Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
                      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups