摘要: 1.堆栈集合(stack、stack<T>) 逻辑:先进后出(ufo)Last in First Out 2.队列集合(Queue、Queue<T>) 逻辑:先进先出(FIFO)First in First Out 3.其他集合 阅读全文
posted @ 2017-05-01 02:06 ADFL 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1.out参数 在一个方法中,返回多个相同类型的值的时候,可以考虑返回一个数组,但是如果返回多个不同类型的值的时候,返回数组就不行,那么这个时候可以考虑用out参数。 out参数侧重于在一个方法中可以返回多个不同类型的值。 using System; using System.Collections 阅读全文
posted @ 2017-04-22 10:44 ADFL 阅读(119) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Collections; using System 阅读全文
posted @ 2017-04-22 09:34 ADFL 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1.在方法前面加[] using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Collections; u 阅读全文
posted @ 2017-04-22 00:26 ADFL 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 反射(Reflection)可以在运行时获 得.NET中每一个类型(包括类、结构、委托、接口和枚举等)的成员,包括方法、属性、事件,以及构造函数等。 反射用到的命名空间: System.Reflection System.Type System.Reflection.Assembly using S 阅读全文
posted @ 2017-04-16 17:00 ADFL 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1.静态方法 using System; namespace sqlcon { class statictest { private static void a() { Console.WriteLine("123"); } static void Main() { statictest.a(); 阅读全文
posted @ 2017-04-16 01:39 ADFL 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 控制器里的内容 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace mvc.Controllers.home { pu 阅读全文
posted @ 2017-04-09 21:28 ADFL 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-04-07 20:28 ADFL 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 1.抽象类和抽象方法 using System; namespace sqlcon { //抽象方法 abstract class testabstract { public abstract void a();//没有方法参数和内容主体,只有一个方法名和参数列表 } class overridet 阅读全文
posted @ 2017-04-05 17:43 ADFL 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 委托基本概念:可以把一个方法作为一个参数传给另一个方法 声明: 方法前加 delegate 关键字 系统封装action 无返回值无参数 , action<T>无返回值有参数,FUNC<x,x,x>有返回值最后一个是返回值 列子: using System; using System.Collect 阅读全文
posted @ 2017-04-03 00:41 ADFL 阅读(197) 评论(0) 推荐(0) 编辑