Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. how to turn off computer

how to turn off computer

Scheduled Pinned Locked Moved .NET (Core and Framework)
tutorial
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kobi10i10
    wrote on last edited by
    #1

    I want to turn off computer in my pograming how i can do this have a nice day/

    V S 2 Replies Last reply
    0
    • K kobi10i10

      I want to turn off computer in my pograming how i can do this have a nice day/

      V Offline
      V Offline
      Vega02
      wrote on last edited by
      #2

      Redirecting to C# forum[^].

      C 2 Replies Last reply
      0
      • K kobi10i10

        I want to turn off computer in my pograming how i can do this have a nice day/

        S Offline
        S Offline
        SriJassbond
        wrote on last edited by
        #3

        C# code: System.Diagnostics.Process.Start("ShutDown", "/s"); /s for ShutDown System.Diagnostics.Process.Start("ShutDown", "/r"); /r for Restart System.Diagnostics.Process.Start("ShutDown", "/l"); /l for LogOff Srinivas Jadhav Mb: 9890596778

        1 Reply Last reply
        0
        • V Vega02

          Redirecting to C# forum[^].

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          Vega02 wrote:

          Redirecting to C# forum

          Why? There is nothing in the C# language that will do this. However there may be stuff in the .NET Framework that might so I'd say this forum is a valid place to put this question.


          Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

          1 Reply Last reply
          0
          • V Vega02

            Redirecting to C# forum[^].

            C Offline
            C Offline
            Colin Angus Mackay
            wrote on last edited by
            #5

            Oh... I see - The OP cross posted to the C# forum where you had already answered the question. Why didn't you say that? It looks like you are saying the C# forum was a better place for the question.


            Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

            V 1 Reply Last reply
            0
            • C Colin Angus Mackay

              Oh... I see - The OP cross posted to the C# forum where you had already answered the question. Why didn't you say that? It looks like you are saying the C# forum was a better place for the question.


              Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

              V Offline
              V Offline
              Vega02
              wrote on last edited by
              #6

              Colin Angus Mackay wrote:

              Oh... I see - The OP cross posted to the C# forum where you had already answered the question. Why didn't you say that? It looks like you are saying the C# forum was a better place for the question.

              No, you're right. I was just trying to redirect all follow-up comments to the other thread in the C# forum to keep them consolidated, but I was working too quickly and didn't clarify that point. Apparently that didn't work out as well as I'd hoped. :-D

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups