引用:http://www.cnblogs.com/xugang/archive/2010/04/17/1714199.html

IPAddress.xml   文件如下:

<?xml version="1.0" encoding="utf-8"?>
<IP>
      <IPAddress>192.168.0.15</IPAddress>
</IP>

 

 

在 Form 窗体(读取XML配置.Designer.cs)中有如下控件:

C# 读写 XML
代码
        private  System.Windows.Forms.Button  button1;//“读取”按钮
        private  System.Windows.Forms.Button  button2;  //“修改”按钮
        private  System.Windows.Forms.TextBox  textBox1;// 用于显示和修改IP地址
        private  System.Windows.Forms.Label  label1;    // 显示“IP地址:”
        private  System.Windows.Forms.Button  button3;  // “保存”按钮
C# 读写 XML

 

 

读取XML配置.cs  文件如下:

按 Ctrl+C 复制代码
按 Ctrl+C 复制代码

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2022-02-19
猜你喜欢
  • 2021-09-12
  • 2021-09-01
  • 2022-01-08
相关资源
相似解决方案