Created
February 1, 2022 11:28
-
-
Save 3rt4nm4n/bc750182f343631266ec5faecfee4e32 to your computer and use it in GitHub Desktop.
Restarting Function for WPF / WinForms programs in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void RestartButton_Click(object sender, RoutedEventArgs e) | |
{ | |
Application.Current.Shutdown(); | |
System.Diagnostics.Process.Start(Environment.GetCommandLineArgs()[0]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment