摘要: https://www.cnblogs.com/fancunwei/p/9851576.html 阅读全文
posted @ 2020-04-12 22:31 谁说程序猿很猥琐 阅读(94) 评论(0) 推荐(0) 编辑
摘要: using System; namespace 原型模式 { class Program { static void Main(string[] args) { // 使用静态构造对象(和单例相似) { System.Diagnostics.Stopwatch stopwatch = new Sys 阅读全文
posted @ 2020-04-12 22:21 谁说程序猿很猥琐 阅读(172) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { /*建造者模式,适合创建复杂对象,与工厂模式的关注点不一样,建造者重点关注,对象过程的创建 * * * */ { // 创建 福特 车 注重每个过程的建造 BuilderFord builder = new BuilderFord( 阅读全文
posted @ 2020-04-12 21:17 谁说程序猿很猥琐 阅读(97) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { Simple simpleOne = new SimpleOne(); simpleOne.ShowName(); Simple simpleTwo = new SimpleTwo(); simpleTwo.ShowName(); 阅读全文
posted @ 2020-04-12 19:33 谁说程序猿很猥琐 阅读(164) 评论(0) 推荐(0) 编辑
摘要: /* * 循环的使用 * * */ // do while int i = 0; do { i++; Console.WriteLine($"{i}"); } while (i < 10); // while while (i < 11) { i++; Console.WriteLine($"{i} 阅读全文
posted @ 2020-04-12 18:31 谁说程序猿很猥琐 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-04-12 17:45 谁说程序猿很猥琐 阅读(142) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { /* C# 基础语法,【数组】的使用及理解 * 数组长度必须固定 * 数组的索引从0开始 * */ string name = "制定项目章程"; string[] nams = new string 阅读全文
posted @ 2020-04-12 12:07 谁说程序猿很猥琐 阅读(88) 评论(0) 推荐(0) 编辑