没有合适的资源?快使用搜索试试~ 我知道了~
xml 文件的创建,保存,读取等基本功能
资源推荐
资源详情
资源评论
public class clsXMLConfig
{
public enum YesNoEnum
{
Yes,
No
}
private const string XML_Suffix = ".cfg";
private string _XMLPath;
private string _AppPath;
private string _ExeName;
private DataSet _ds;
public string Value
{
get
{
DataView dataView = new DataView(this._ds.Tables[0]);
dataView.Sort = "key";
int num = dataView.Find(Key.ToUpper().Trim());
string result;
if (num > -1)
{
result = StringType.FromObject(dataView[num]["value"]);
}
else
{
result = "";
}
return result;
}
{
public enum YesNoEnum
{
Yes,
No
}
private const string XML_Suffix = ".cfg";
private string _XMLPath;
private string _AppPath;
private string _ExeName;
private DataSet _ds;
public string Value
{
get
{
DataView dataView = new DataView(this._ds.Tables[0]);
dataView.Sort = "key";
int num = dataView.Find(Key.ToUpper().Trim());
string result;
if (num > -1)
{
result = StringType.FromObject(dataView[num]["value"]);
}
else
{
result = "";
}
return result;
}
set
{
DataView dataView = new DataView(this._ds.Tables[0]);
dataView.Sort = "key";
int num = dataView.Find(Key.ToUpper().Trim());
if (num == -1)
{
string[] values = new string[]
{
Key.ToUpper().Trim(),
value
};
this._ds.Tables[0].Rows.Add(values);
}
else
{
dataView[num]["key"] = Key.ToUpper().Trim();
dataView[num]["value"] = value;
}
}
}
public object XMLPath
{
get
{
return this._XMLPath;
}
set
{
this._XMLPath = StringType.FromObject(value);
{
DataView dataView = new DataView(this._ds.Tables[0]);
dataView.Sort = "key";
int num = dataView.Find(Key.ToUpper().Trim());
if (num == -1)
{
string[] values = new string[]
{
Key.ToUpper().Trim(),
value
};
this._ds.Tables[0].Rows.Add(values);
}
else
{
dataView[num]["key"] = Key.ToUpper().Trim();
dataView[num]["value"] = value;
}
}
}
public object XMLPath
{
get
{
return this._XMLPath;
}
set
{
this._XMLPath = StringType.FromObject(value);
剩余5页未读,继续阅读
资源评论
h0508060095
- 粉丝: 0
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功