Reputation: 2491
Why is it that the Startup Object under Project properties for a solution will only recognize files with a Main() method without any parameters?
For example:
public static void Main()
is fine
whereas
public static void Main(String[] Args)
will not be picked up by the Visual Studio as a valid Startup Object?
Upvotes: 0
Views: 237
Reputation: 16705
Your question is wrong in it's premise that you cannot do this. A console application will let you pass arguments in exactly that way:
static void Main(string[] args)
However, for a WPF app, you can choose a start-up object, or allow the object to be specified in the app.config
. Consequently, there is no place for start-up parameters.
Upvotes: 1