The problem is that the connection is intermittent,so I might copy and delete one second but can only copy the next.
How can I get the Ping Class to run for a longer period?
How can i view the Ping Statistics from the Ping?
Here is the code:
Expand|Select|Wrap|Line Numbers
- class PingClass
- {
- public bool pingStore(string ipAddress)
- {
- bool status = false;
- Ping pingsender = new Ping();
- IPAddress storeIP = IPAddress.Parse(ipAddress);
- PingReply reply = pingsender.Send(storeIP , 120);
- if (reply.Status == IPStatus.Success)
- {
- status = true;
- }
- return status;
- }