Look at the proper code
For system shutdown
System.Diagnostics.Process.Start("ShutDown", "/s")
For Immediate Shut Down
System.Diagnostics.Process.Start("ShutDown", "-s -t 00")
For system restart, below command is used
System.Diagnostics.Process.Start("ShutDown", "/r")
For Immediate Restart
System.Diagnostics.Process.Start("ShutDown", "-r -t 00")