摘要: string str ="welcome to bejing , hello china,jiyou wuhan"; Dictionary<char, int> dict = new Dictionary<char, int>(); for (int i = 0; i < str.Length; i 阅读全文
posted @ 2020-10-15 16:11 Nanyingming 阅读(661) 评论(0) 推荐(0) 编辑
摘要: Console.WriteLine("请输入一段字符串:"); string str = Console.ReadLine(); char[] chs = new char[str.Length]; int i = 0; //将字符串转成数组; foreach (var item in str) { 阅读全文
posted @ 2020-10-15 15:27 Nanyingming 阅读(918) 评论(0) 推荐(0) 编辑
摘要: //将一个数组中的奇数放到一个集合中,再将偶数放到另一个集合中 //最终将两个集合合并为一个集合,并且奇数显示在左边 偶数显示在右边。 阅读全文
posted @ 2020-10-15 15:25 Nanyingming 阅读(340) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespac 阅读全文
posted @ 2020-10-15 08:39 Nanyingming 阅读(275) 评论(0) 推荐(0) 编辑