
C#
hello_smu
这个作者很懒,什么都没留下…
展开
-
C# 读取.resx资源文件内字符串的方法
添加资源文件,并命名为innerResource.resx。代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Collections;using System.Reso原创 2017-02-28 14:50:19 · 13002 阅读 · 0 评论 -
C# List与HashSet互相转换,达到List去重的目的
List<int> list = new List<int>(); list.Add(5); list.Add(2); list.Add(1); list.Add(1); HashSet<int> hs = new H...原创 2018-11-22 10:43:04 · 10112 阅读 · 0 评论 -
C# 大规模数据分批与数据库交互
private static void ModifyInBatch(List<int> ids) { //Hashtable ht = new Hashtable(); List<int> subIdList = new List<int>(); if (ids != n...原创 2018-11-22 10:55:48 · 2290 阅读 · 1 评论 -
C# 提取字符串中的数字,并进行运算
string str = "1箱-张三,8件-李四,12包-王五"; string[] a; string result; int sum = 0; if (!string.IsNullOrEmpty(str)) { ...原创 2018-11-22 11:04:21 · 4012 阅读 · 0 评论 -
C# List类型分组求和
static void Main(string[] args) { List<Person> personList = new List<Person>(); Person p1 = new Person(); p1.Name = "Bob"; ...原创 2018-11-22 12:18:31 · 17344 阅读 · 1 评论