How to shut down the computer using c# code.

Posted by Jitendrasoft09 under C# on 3/29/2013 | Points: 10 | Views : 4487 | Status : [Member] [MVP] | Replies : 3
one application needs to be created to shut down the computer, What is code for that?

Jitendra Kumar
If my post helps you, plz mark as an answer.



Responses

Posted by: Sahoo on: 3/29/2013 [Member] Starter | Points: 25

Up
0
Down
try it
http://stackoverflow.com/questions/102567/how-to-shutdown-the-computer-from-c-sharp

Thanks

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Satyapriyanayak on: 3/29/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Diagnostics;



namespace Dotneter.com

{

class Program

{

static void Main(string[] args)

{

Process.Start("shutdown.exe", "-s");

}

}

}

http://www.dotneter.com/shutdown-the-computer-using-c
http://www.codeproject.com/Tips/480049/Shut-Down-Restart-Log-off-or-Lock-your-computer-in


If this post helps you mark it as answer
Thanks


If this post helps you mark it as answer
Thanks

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kiran.Shetty2401 on: 3/29/2013 [Member] Starter | Points: 25

Up
0
Down
thanks.. let me try to run n check..

Kiran Kumar Shetty

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response