- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 C# 删除XML节点
<?xml version="1.0" encoding="utf-8"?><data> <aaa>bbb</aaa></data> //删除Xml节点 public static void DeleteXmlNode(string xmlpath) { if (File.Exists(xmlpath)) { XmlDocument
2020-12-07 14:33:42 2196
原创 C# JObject解析json数组
导入 using Newtonsoft.Json;json{ "code": "SUCCESS", "msg": null, "data": [{ "id": 31783735, "residentInfoId": 2000099151, "doctorId": "89bd0716-f916-4e51-93f7-4d416830f03c" }]}C#代码 JObje...
2019-11-27 17:10:02 5612
原创 C#string数组中每一个数字值加1
//根据","分割字符串 string[] s = str.Split(','); //将string数组转换为int数组 int[] nums = Array.ConvertAll(s, int.Parse); //循环遍历添加 for(int i=0;i<nums.Length;i++) { nums[i] += 1; } //转换...
2019-11-21 14:59:05 3055 1
原创 C#获取ICollection<T>某一类型中所有的值
public List<DateTime?> GetAllTime(ICollection<> icon) { List<DateTime?> list = new List<DateTime?>(); foreach(var item in icon) {...
2019-10-30 12:01:04 1738
原创 C#获取xml中元素(Elenment)的值
需要导入using System.Xml.Linq;//xml文件<?xml version="1.0" encoding="utf-8" ?><Confing> <111>{C:/B/S}</111> <222>{C:/B/D}</222> <333>{C:/B/I}</333>...
2019-10-17 12:35:19 858
原创 C#获取List<string>或者文本中的指定字符串的行数
public string Get_line(string findStr,List<string> lines) { foreach(string item in lines) { if(item.Contains(findStr)) { ...
2019-10-16 17:17:55 1858
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人