c# - NetworkInformation.IPGlobalProperties vs. WMI for Ipaddresses, dns-servers, dhcp etc -
should prefer 1 on other?
im leaning heavily towards networkinformation.ipglobalproperties
instead of select * win32_networkadapterconfiguration
wmi if can verify information need available
use networkinformation
if can , if can provide want. wmi more generic interface implements sorts of things, , service can stopped or might not available or corrupted (it has happened me few times). networkinformation
believe wrapper around win32 apis should work , have no dependencies (besides .net 3.0+).
always better use simplest , more specific tool gets job done.
Comments
Post a Comment