c# - Application.Restart() does not close the old one, but start a new one -


c# wpf application, kinect application

called page, wanted restart whole application

system.diagnostics.process.start(system.windows.forms.application.executablepath); system.windows.forms.application.exit(); 

also not close old one. why it? hack can do? kind last-minute need hack solution because going demo in hour.

thanks.

you can use this. work on wpf

system.diagnostics.process.start(environment.currentdirectory+"\\yourexename"); close(); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -