using System;
using System.Diagnostics;
namespace ZZ
{
class ZZConsole
{
[STAThread]
static void Main(string[] args)
{
string ip = "192.192.132.229";
string strRst = CmdPing(ip);
Console.WriteLine(strRst);
Console.ReadLine();
}
private static string CmdPing(string strIp)
{
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
string pingrst; p.Start();
p.StandardInput.WriteLine("ping -n