internal SystemUdpStatistics(AddressFamily family) { uint result = UnsafeNetInfoNativeMethods.GetUdpStatisticsEx(out stats, family); if (result != IpHelperErrors.Success) { throw new NetworkInformationException((int)result); } }
internal SystemUdpStatistics(AddressFamily family) { uint udpStatistics; if (!ComNetOS.IsPostWin2K) { if (family != AddressFamily.InterNetwork) { throw new PlatformNotSupportedException(SR.GetString("WinXPRequired")); } udpStatistics = UnsafeNetInfoNativeMethods.GetUdpStatistics(out this.stats); } else { udpStatistics = UnsafeNetInfoNativeMethods.GetUdpStatisticsEx(out this.stats, family); } if (udpStatistics != 0) { throw new NetworkInformationException((int)udpStatistics); } }