原文发布时间为:2013-06-22 —— 来源于本人的百度文章 [由搬家工具导入]

),
newNameResolutionCallback(handle =>
{
NetworkInterfaceInfo info = handle.NetworkInterface;
if(info != null)
{
switch(info.InterfaceType)
{
caseNetworkInterfaceType.Ethernet:
NetName = "Ethernet";
break;
caseNetworkInterfaceType.MobileBroadbandCdma:
caseNetworkInterfaceType.MobileBroadbandGsm:
switch(info.InterfaceSubtype)
{
caseNetworkInterfaceSubType.Cellular_3G:
caseNetworkInterfaceSubType.Cellular_EVDO:
caseNetworkInterfaceSubType.Cellular_EVDV:
caseNetworkInterfaceSubType.Cellular_HSPA:
NetName = "3G";
break;
caseNetworkInterfaceSubType.Cellular_GPRS:
caseNetworkInterfaceSubType.Cellular_EDGE:
caseNetworkInterfaceSubType.Cellular_1XRTT:
NetName = "2G";
break;
default:
NetName = "None";
break;
}
break;
caseNetworkInterfaceType.Wireless80211:
NetName = "WiFi";
break;
default:
NetName = "None";
break;
}
}
else
NetName = "None";
}), null);
}