cs程序 动态读写 resources.resx 文件?

chkmouse1 2010-06-11 10:53:26
cs程序 动态读写 resources.resx 文件?

给句代码,谢谢。
...全文
137 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zzx509 2010-06-11
  • 打赏
  • 举报
回复
ResXResourceWriter rrw = new ResXResourceWriter(@"F:\a.resx");
rrw.AddResource("obj1", "abcd");
rrw.AddResource("obj2", 34);
rrw.AddResource("obj3", new TreeNode("root"));
rrw.Close();

ResXResourceReader rr = new ResXResourceReader(@"F:\a.resx");
IDictionaryEnumerator ide = rr.GetEnumerator();
while (ide.MoveNext())
{
Console.WriteLine("key:" + ide.Key + " value:" + ide.Value);
}
rr.Close();
chkmouse1 2010-06-11
  • 打赏
  • 举报
回复
动态读写 字符串

110,545

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧