Home > other >  Written in c # using CMD call themselves the ping program, how to do?
Written in c # using CMD call themselves the ping program, how to do?

Time:10-08

Himself wrote a ping program, call the CMD in vs execution, but no response, there has been no return a result, seek help from a great god!!!!!!

CodePudding user response:

A little bit more simple method, redirect to a file, then open the file to read

CodePudding user response:

Many online code, do not copy and paste,
According to your requirement to do, to create a process directly, run the CMD. Exe, redirect its input and output can be asynchronous receive real-time data and return, we can see this post: http://blog.csdn.net/irwin_chen/article/details/7430551

In addition, also can directly use the.net socket to realize the icmp protocol, refer to the article: http://www.xuebuyuan.com/1642800.html
  • Related