使用C#获取IP地址 [英] Get IP Address using c#

查看:80
本文介绍了使用C#获取IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我在此链接中找到了一篇文章,该文章使用c#代码(控制台应用程序)获取PC的IP( A-Machine>如何获取计算机的IP地址 [ ^ ])

但是控制台会自动关闭,我无法查看结果.

Hi i found an article to get the IP of a PC using c# code(Console Apps) here in this link(A-Machine">How To Get IP Address Of A Machine[^])

But the console closes automatically and i am not able to view the results

推荐答案

使用Ctrl + F5运行程序.
Run the program using Ctrl+F5.


通过使用 Console.ReadKey
By using Console.ReadKey or Console.ReadLine The Command Prompt launched will be visible until you press a single key or a new a new line


这篇关于使用C#获取IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆