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 -

What is the difference between data design and data model(ERD) -

ios - Can NSManagedObject conform to NSCoding -