博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C# Process
阅读量:7101 次
发布时间:2019-06-28

本文共 477 字,大约阅读时间需要 1 分钟。

using (Process process = new System.Diagnostics.Process())  {      process.StartInfo.FileName = "ping";      process.StartInfo.Arguments = "";      // 必须禁用操作系统外壳程序      process.StartInfo.UseShellExecute = false;      process.StartInfo.CreateNoWindow = true;      process.StartInfo.RedirectStandardOutput = true; 

    process.Start(); 

    string output = process.StandardOutput.ReadToEnd(); 

    if (String.IsNullOrEmpty(output) == false)          this.textBox1.AppendText(output + "\r\n"); 

    process.WaitForExit();      process.Close();  }

转载地址:http://llkhl.baihongyu.com/

你可能感兴趣的文章
Eclipse快捷键大全
查看>>
Java -- 获取MAC地址
查看>>
Visual Prolog 的 Web 专家系统 (1)
查看>>
void 指针的转换
查看>>
再议Unity优化
查看>>
localhost兼容js不能用
查看>>
Makefile 10——打造更专业的编译环境-huge项目
查看>>
Create and Call HttpHandler in SharePoint
查看>>
pymysql.err.InternalError: (1054, "Unknown column 'None' in 'field list'")
查看>>
树莓派与window 10组成的物联网核心:让人失望
查看>>
Servlet的异常处理
查看>>
支付宝 app支付 沙盘使用
查看>>
Redis持久化配置-AOF
查看>>
计算机网络的应用层简单介绍:
查看>>
需求管理之客户需求何时休?
查看>>
Java进化? Kotlin初探与集成Android项目
查看>>
URL中的#
查看>>
CentOS自带mysql配置(密码更改、端口开放访问、添加进系统启动项)
查看>>
MYSQL中动态行数据转列数据
查看>>
anchor_target_layer中的bounding regression
查看>>