摘要: 图1: 线程状态关系图 你可以通过ThreadState属性获取线程的执行状态。图1将ThreadState列举为“层”。ThreadState被设计的很恐怖,它以按位计算的方式组合三种状态“层”,每种状态层的成员它们间都是互斥的,下面是所有的三种状态“层”: 运行 (running) / 阻止 ( 阅读全文
posted @ 2016-07-28 15:17 隐逸天涯 阅读(2237) 评论(0) 推荐(0) 编辑
摘要: 程序使用vs 2010编写 阅读全文
posted @ 2016-07-28 13:47 隐逸天涯 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1.值类型存储的是数值,引用类型存储的是地址。2.值类型存放在栈中,引用类型存放在堆中。3.值类型不可以是null,引用类型可以使null。4.值类型不具有多态性,引用类型具有多态性。5.值类型没有继承性,引用类型有继承性。6.值类型有装箱与未装箱,引用类型只有装箱。 using System; using System.Collections.Generic; using System.Tex... 阅读全文
posted @ 2016-07-21 16:05 隐逸天涯 阅读(179) 评论(0) 推荐(0) 编辑
摘要: #region #隐藏后注释名 #endregion 阅读全文
posted @ 2016-07-19 19:47 隐逸天涯 阅读(942) 评论(0) 推荐(0) 编辑
摘要: 对于单重继承接口的访问,用户可以使用点运算符(.)来访问接口的方法成员,属性成员和事件成员。对于多重继承接口的访问,要使用显示的类型转化来解决这种访问冲突 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace li2_5 { interface I... 阅读全文
posted @ 2016-07-18 13:01 隐逸天涯 阅读(143) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace li2_5 { public class Employee { private double bsalary=1500; private double ... 阅读全文
posted @ 2016-07-18 09:56 隐逸天涯 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 1.在namespace中的类、接口默认是internal类型的,也可以显示的定义为public类型,不允许是其他访问类型。2.在一个类里面,属性和方法默认是private的,可以显示的定义为public、private、protected、internal或protected internal等访 阅读全文
posted @ 2016-07-18 09:02 隐逸天涯 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 namespace suoyinzhishiqi 6 { 7 public class B 8 { 9 public void outstring() 1... 阅读全文
posted @ 2016-07-17 17:28 隐逸天涯 阅读(187) 评论(0) 推荐(0) 编辑
摘要: //重载索引指示器,接受不同类型的参数 using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace suoyinzhishiqi{ class OvrIndexer { pri 阅读全文
posted @ 2016-07-17 12:58 隐逸天涯 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 官方描述:索引器允许类或结构的实例就像数组一样进行索引。索引器形态类似于,不同之处在于它们的取值函数采用参数。 这一功能在创建集合类的场合特别有用,而在其他某些情况下,比如处理大型文件或者抽象有些资源等,能让类具有类似数组行为也是非常有用的。 大致结构: <modifier><return type 阅读全文
posted @ 2016-07-17 12:35 隐逸天涯 阅读(355) 评论(0) 推荐(0) 编辑