Changing startup object of console application at runtime
Posted
by MicMit
on Stack Overflow
See other posts from Stack Overflow
or by MicMit
Published on 2010-03-18T02:16:33Z
Indexed on
2010/03/18
2:21 UTC
Read the original article
Hit count: 710
c#
|console-application
Assuming I've got several unrelated classes in separate files with a main method in each. Currently project is a console application and I just change a startup object in IDE to run respective main which instantiates respective class from IDE. Out of curiosity would it be possible to change the startup object dynamically at runtime somehow before launching this exe as an alternative of having this project as a class library and repeating code which I have in main(s) somewhere else.
© Stack Overflow or respective owner