dc

dc

  • NA
  • 663
  • 0

passs parameters to C# 2008 app

Aug 24 2012 11:49 AM
I would like to know how to pass values to a C# 2008 console application that my small company obtained from a contract shop.
My goal is to be able to step though (debug) the code so that I can understand the application.

Right now I have been able to compile the application and set break points to see where the problem lies. The application starts in the main method and stops executing when it is looking for 2 parameters that need to be passed.

Right now to run the application I click on a windows command file that looks like the following:
Start .\samclt\bin\Debug\samcl.exe encrypted_value https://test/test/testWebService 1 ITEM

The first value is 'encrypted_value' is an encrypted value, the second parameter is used to call  a webservice named testWebService and the values of 1 and ITEM are passed to the web service.

Due to what I stated above, I have the following two questions:

1. When I want to start the C# application from a debug mode, how can I pass the two required parameters to the application and let the application 'see' parameter values and have access to the values?
 
 2.  When I start the C# application from the command prompt, how can I pass the two required parameters to the application and let the application 'see' parameter values and have access to the values?


 
 
 

Answers (1)