Skip to content

Instantly share code, notes, and snippets.

@3rt4nm4n
Created February 1, 2022 11:28
Show Gist options
  • Save 3rt4nm4n/bc750182f343631266ec5faecfee4e32 to your computer and use it in GitHub Desktop.
Save 3rt4nm4n/bc750182f343631266ec5faecfee4e32 to your computer and use it in GitHub Desktop.
Restarting Function for WPF / WinForms programs in C#
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