How to get this unit IP?

xiaoxiao2021-03-06  41

You can use the following method:

First, add a namespace:

Using system.net;

Get this machine IP as follows:

System.net.Ipaddress addr = new system.net.ipaddress (DNS.GethostName (DNS.GETHOSTNAME ()). AddressList [0] .address);

转载请注明原文地址:https://www.9cbs.com/read-119419.html

New Post(0)