zoukankan      html  css  js  c++  java
  • c#启动本机程序

      写一段简单的程序启动本机上的程序,千千静听,IE或者计算器。觉得挺有意思的。初学,和大家分享一下。我是使用的控制台应用程序

    首先添加命名空间:

    using System.Diagnostics;

     

    namespace 控制台

    {

        class Program

        {

            static void Main(string[] args)

            {

                Console.WriteLine("please input :1-千千静听,2-IE,3-计算器");

                int cmd = Console.Read();

                if (cmd == 49)

                    Process.Start("TTPlayer.exe");

                else if (cmd == 50)

                    Process.Start("IEXPLORE.EXE");

                else if (cmd == 51 )

                    Process.Start("Calc.exe");

                Console.ReadLine();

            }

        }

    }

  • 相关阅读:
    meta标签
    html5新增标签
    jQuery鼠标事件
    Jenkins在Linux环境安装
    3、jQuery的DOM基础
    2、jQuery选择器
    1、jQuery概述
    伪分布模式安装hadoop
    poj 2773欧几里德
    poj 1298(水题)
  • 原文地址:https://www.cnblogs.com/janes/p/1249636.html
Copyright © 2011-2022 走看看