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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -