
C#
彬民
这个作者很懒,什么都没留下…
展开
-
C# 将字符串(符合xml格式)与XML互转
转自https://blog.youkuaiyun.com/u011555996/article/details/53307830//xml 转 stringSystem.Xml.XmlDocument doc = new System.Xml.XmlDocument();//新建对象doc.Load("filePath");//XML文件路径string content=doc.InnerXm...转载 2018-08-29 09:50:39 · 16062 阅读 · 0 评论 -
C# 使用StreamWriter StreamReader 写读txt文件
写文件var str=“十年磨一剑”;var txtPath = "C:\\MergeData.txt";FileStream fs;StreamWriter sw;fs = new FileStream(txtPath,FileMode.Create,FileAccess.Write);sw= new StreamWriter(fs,Encoding.UTF8);s...原创 2019-01-18 11:23:29 · 1945 阅读 · 0 评论 -
winform 读取本地连接ip与修改
读取本地连接ipManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration"); ManagementObjectCollection nics = mc.GetInstances(); foreach (ManagementObject nic in n...转载 2019-06-05 15:06:02 · 735 阅读 · 0 评论 -
winform 配置文件(app.config)修改
var xDoc = new System.Xml.XmlDocument(); xDoc.Load(Application.ExecutablePath + ".config"); //加载配置文件位置(应用程序.exe.config) var xNode = xDoc.SelectSingleNod...转载 2019-06-05 15:18:01 · 1255 阅读 · 0 评论