简体   繁体   中英

After creating ICMP object it is showing error message in exception as?

I got error as manhandled exception in pinglib.dll while creating object of ICMP class in pivo.ping. It is working on one machine but same code is not working on another machine. Please rectify. It is showing MSG=????????????

void main()
  {
   try
     {
      ICMP obj=new ICMP();
     }
   catch(Exception ex)
     {
        string msg=ex.Message();
        Console.WriteLine(msg);
     }
   }

}

Why aren't you using the standard Ping method included in .NET ?

Ping pingSender = new Ping ();
PingReply reply = pingSender.Send ("www.contoso.com");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM