How to set IP address of device connected to Host PC? C# Winform?
问题 I have a Modbus TCP/IP to MODBUS RTU converter , which comes with a default IP of 192.168.0.1 . I need to develop a small c# Winform app to change this device's IP address to any desired IP address. How do I do that?. 回答1: You could do it with WMI (Windows Management Instrumentation). First, you have to add the reference for System.Management to your Project. Second, you need to find the NetworkInterface for your network connection by name: using System.Net.NetworkInformation; using System