1:读取config配置文件中的响应属性名:ConfigurationSettings.AppSettings.Get("已定义的属性名");
2:检测当前网段与服务器的链接状态:
using using System.Net.NetworkInformation;
3:读写注册表操作
// GetValue ( string name )方法是指定键的键值。
using Microsoft.Win32;
本文介绍了如何使用C#从配置文件中读取属性,并通过Ping命令检查与服务器的连接状态,还展示了如何进行注册表的读写操作。
1:读取config配置文件中的响应属性名:ConfigurationSettings.AppSettings.Get("已定义的属性名");
2:检测当前网段与服务器的链接状态:
using using System.Net.NetworkInformation;
3:读写注册表操作
// GetValue ( string name )方法是指定键的键值。
using Microsoft.Win32;
1009

被折叠的 条评论
为什么被折叠?