1.首先找到host文件:C:\Windows\System32\drivers\etc 2.打开host文件: # Copyright (c) 1993-2009 Microsoft Corp. ## This is a sample HOSTS file used by Microsoft TCP/IP for Windows. ## This file contains the mappings of IP addresses to host names. Each # entry sho
一.通过WMI获取物理适配器序号 NetEnabled: 是否启用了适配器,True为启用,False为禁用;PhysicalAdapter: 适配器是否物理或逻辑适配器,True为物理,False为逻辑; public static List<int> GetUseIndex() { List<int> list = new List<int>(); ManagementClass mc = new ManagementClass("Win32_Networ