MZ-NetBlog主题

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

C# Xml序列化与反序列化

2835 0

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 …

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

WinForm ListView对XML增删改查

1889 0

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…

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

创建XML和XML读到Dictionary

1131 0

namespace ListBox和XML操作 {public partial class Form1 : Form{public Form1(){InitializeComponent();}Dictionary<string, person> dic = new Dictionary<string, person>();private void button1_Click(object sender, EventArgs e){AddData();foreach (Cont…

C#读xml_RSS_到TreeView
C#基础

C#读xml_RSS_到TreeView

829 0

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文件

3133 1

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&…

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

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

819 0

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为应用程序…