本文介绍了平电脑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它仅使用第一个IP地址而不是第二个吗?

Its taking first IP address only not second one?

int [] bping = {"192.168.1.1","192.168.1.2" };

int[] bping = { "192.168.1.1", "192.168.1.2" };

           for(int i = 0; 1< bping.Length; i ++)
           {
                             ping ping = new Ping();
                             PingReply pingReply = ping.Send(bping [i] .ToString());

            for (int i = 0; 1<bping.Length; i++)
            {
                Ping ping = new Ping();
                PingReply pingReply = ping.Send(bping[i].ToString());

               Console.WriteLine("Status:{0}",pingReply.Status +" + pingReply.Address);
            
                             Console.ReadLine();
           }

                Console.WriteLine("Status: {0}", pingReply.Status + " " + pingReply.Address);
              
                Console.ReadLine();
            }

[email protected]

[email protected]

推荐答案

string[] bping = { "192.168.1.1", "192.168.1.2" };for (int i = 0; i < bping.Length; i++){    Ping ping = new Ping();    PingReply pingReply = ping.Send(bping[i].ToString());    Console.WriteLine("Status: {0}", pingReply.Status + " " + pingReply.Address);                      }Console.ReadLine();



这篇关于平电脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 23:37