Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Starting exe from another exe
Message
From
10/06/2008 18:50:44
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01322835
Message ID:
01322959
Views:
22
>No exe accepts "arrays" as parameters directly, an exe can only accept a string of parameters.

Um, well, that's not quite accurate. In order to send more than one parameter to an application, you define the Main like this:
[STAThread]
static void Main(string[] args)
{
	if (args.Length > 1)
		// do stuff with your parms

	Application.Run(new Form1());
}
Sure looks like an array to me. <g>

Maybe VB is different? I dunno ...

~~Bonnie




>No exe accepts "arrays" as parameters directly, an exe can only accept a string of parameters. How the exe handles those parameters is up the the developer of the exe. Look at the command you are using, intellisense shows you that it needs a string value. All you need to do is suppy the data in the proper object (in this case a string) for the command and you'll be fine.
>
>>Hi Ben
>>
>>Thanks for that, but that’s what I am getting confused about, doesn’t the main program that I am calling expect and array?
>>Tia
>>Stuart
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform