V
Victor
In his book "Programming Microsoft Windows with C#", page 42, Petzold deals
with the case of a project with multiple Mains.
He explains that when compiling in the command line the argument /main can
be used, as in
csc prog1.cs prog2.cs /main
rog2ClassContainigMain (the code details are
mine)
Then he goes on to explain how to do the same thing when using Visual C#
..Net, or so I expected. He mentions to use the Add Existing Item dialog
box, and selecting the Link File option next to the Open button. However,
this does not deal with the issue of multiple Main() functions.
So my questions are:
1. Is it possible that VS does not have a way to deal with multiple
Main() functions?
2. Could it be that I am missing something?
3. Could it be that P. forgot to explain something?
4. If there is a way to use VS to have the same result as with the
command line (letting the project to use only one of the Main() functions),
what is it?
Thanks,
Victor
with the case of a project with multiple Mains.
He explains that when compiling in the command line the argument /main can
be used, as in
csc prog1.cs prog2.cs /main

mine)
Then he goes on to explain how to do the same thing when using Visual C#
..Net, or so I expected. He mentions to use the Add Existing Item dialog
box, and selecting the Link File option next to the Open button. However,
this does not deal with the issue of multiple Main() functions.
So my questions are:
1. Is it possible that VS does not have a way to deal with multiple
Main() functions?
2. Could it be that I am missing something?
3. Could it be that P. forgot to explain something?
4. If there is a way to use VS to have the same result as with the
command line (letting the project to use only one of the Main() functions),
what is it?
Thanks,
Victor