摘要: 定义类的两种方法, 1.在源文件基础上添加 public class Student { // 定义变量 public string name; public int stuNo; public int age; } 2.单独在文件添加 类的实例化 构造函数 构造函数分为无参构造函数与有参构造函数 阅读全文
posted @ 2019-04-06 18:51 cicarius 阅读(693) 评论(0) 推荐(0) 编辑
摘要: 字符串比较,strA.CompareTo(strB) A大于B 正数 A小于B 负数 A等于B 0 查找字符串的位置 IndexOf,LastIndexOf,StartWith,EndWith 格式化输出 输出钱的格式 Concat,Join,'+'表示连接字符串 字符串拆分成字符串数组 Trim清 阅读全文
posted @ 2019-04-06 17:38 cicarius 阅读(191) 评论(0) 推荐(0) 编辑
摘要: win+R调出运行窗口: 输入services.msc,查找 跳出服务窗口,点击windows update设置禁用即可 Windows Update Medic Service没办法禁用,需要采用其他的办法 通过“Win”+ “R”组合键,打开运行窗口,输入“regedit”, 在注册表中找到“计 阅读全文
posted @ 2019-04-06 13:12 cicarius 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 数组ArrayList 数组ArrayList容量本身是不固定的,根据存储的数据动态变化 输出ArrayList元素:每个放到ArrayList里的数组元素都会转换为object类型存放 排序 ArrayList的增加与删除元素 想ArrayList插入元素 删除ArrayList元素 arrLis 阅读全文
posted @ 2019-04-06 10:46 cicarius 阅读(635) 评论(0) 推荐(0) 编辑
摘要: 冒泡排序基础 冒泡排序原理图分析 tmp在算法中起到数据交换的作用 c int[] intNums = { 12,6,9,3,8,7 }; int tmp = intNums[0]; // 一共5次冒泡,从1开始 for(int i = 1; i intNums[j]) { tmp = intNum 阅读全文
posted @ 2019-04-06 09:25 cicarius 阅读(723) 评论(0) 推荐(0) 编辑
摘要: 数组定义 定义数组并赋值 求最大值最小值 在原有数组中新增 c int[] arrS = new int[4] { 12, 13, 14, 15 }; int[] tmp = new int[arrS.Length + 1]; //新增一个数据 for(int i = 0; i = 0) { int 阅读全文
posted @ 2019-04-06 06:59 cicarius 阅读(2240) 评论(0) 推荐(0) 编辑