NetBlog主题

创建XML和XML读到Dictionary
C#基础

创建XML和XML读到Dictionary

3640

namespace ListBox和XML操作 {public partial class Form1 : Form{public Form1(){InitializeComponent();}Dictionary dic = new Dictionary();private void button1_Click(object sender, EventArgs e){AddData();foreach (Control c in thi…

读xml文件到dataTable,dataTable保存到XML文件里面
C#基础

读xml文件到dataTable,dataTable保存到XML文件里面

3429

2018-11-21修改 添加演示图 及JH.xml文件 2018-03-04修改 先看一下演示以下是核心代码DataSet ds = new DataSet();private void ReadXml(){//转载请保留原创地址 http://www.luofenming.com/show.aspx?id=ART2017071200001//AppDomain.CurrentDomain.BaseDirectory为应用程序…

WinForm ListView对XML增删改查
C#基础

WinForm ListView对XML增删改查

4984

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Xml;namespace XML增删改查 {public partial class Form1 : For…

C#  两种方法创建XML文件
C#基础

C# 两种方法创建XML文件

8293

using System; using System.Collections.Generic; using System.Windows.Forms; using System.Xml; using System.Xml.Linq;namespace XML文件创建 {public partial class Form1 : Form{public Form1(){InitializeComponent();}List<Penson> list = new List<Penson&…

C#读xml_RSS_到TreeView
C#基础

C#读xml_RSS_到TreeView

2864

namespace 读xml_RSS_到TreeView {public partial class Form1 : Form{public Form1(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){XmlDocument doc = new XmlDocument();doc.Load("1.xml");XmlElement rootXml = doc.Document…

C# Xml序列化与反序列化
C#基础

C# Xml序列化与反序列化

9565

using System.IO;using System.Xml.Serialization;private void TestXmlSerialize(){//原创来自 http://www.luofenming.com/show.aspx?id=ART2018112100001转载请保留此地址string ConfigPath = AppDomain.CurrentDomain.BaseDirectory + "JH.xml";string xmlData …