Ejemplo n.º 1
0
        /// <summary>
        /// 输出IP地址
        /// </summary>
        /// <param name="urlStr"></param>
        /// <returns></returns>
        private async Task PrintIpArray()
        {
            var ips = await NetHelper.GetHostAddresses(GetUrl());

            string str = string.Empty;

            foreach (var item in ips)
            {
                str += string.Format("\n{0}", item);
            }
            MessageBox.Show(str, "IP地址");
        }