摘要:
引用类型的变量不直接包含其数据;它包含的是对其数据的引用。当通过值传递引用类型的参数时,有可能更改引用所指向的数据,如某类成员的值。但是无法更改引用本身的值;也就是说,不能使用相同的引用为新类分配内存并使之在块外保持。若要这样做,应使用ref或out关键字传递参数。通过ref允许调用方法来修改引用参...
阅读全文
posted @ 2014-07-18 17:00
chuwachen
阅读(548)
推荐(0)
摘要:
CLR管理内存的区域,主要有三块,分别为:1.线程的堆栈:(在程序应该编译过程为值类型实例分配好内存)用于分配值类型实例。堆栈主要由操作系统管理,而不受垃圾收集器的控制,当值类型实例所在方法结束时,其存储单位自动释放。栈的执行效率高,但存储容量有限。对于值类型来说,一般创建在线程的堆栈上。但并非所有...
阅读全文
posted @ 2014-07-18 16:49
chuwachen
阅读(230)
推荐(0)
摘要:
值类型包括原类型(Sbyte、Byte、Short、Ushort、Int、Uint、Long、Ulong、Char、Float、Double、Bool、Decimal)、枚举(enum)、结构(struct),引用类型包括:类、数组、接口、委托、字符串等。值型就是在栈中分配内存,在申明的同时就初始化...
阅读全文
posted @ 2014-07-15 15:23
chuwachen
阅读(702)
推荐(0)
摘要:
staticUse thestaticmodifier to declare a static member, which belongs to the type itself rather than to a specific object.Thestaticmodifier can be use...
阅读全文
posted @ 2014-07-11 12:34
chuwachen
阅读(187)
推荐(0)
摘要:
internal声明类、类成员、接口或接口成员具有内部可见性。internal修饰符使类、接口或成员仅在当前包中可见。当前包之外的代码不能访问internal成员。只有在同一程序集的文件中,内部类型或成员才是可访问的在全局范围内,internal修饰符与public修饰符相同。不能将internal...
阅读全文
posted @ 2014-07-11 11:45
chuwachen
阅读(163)
推荐(0)
摘要:
A static constructor is used to initialize anystaticdata, or to perform a particular action that needs to be performed once only. It is called automat...
阅读全文
posted @ 2014-07-07 18:17
chuwachen
阅读(169)
推荐(0)
摘要:
http://www.cnblogs.com/wangiqngpei557/archive/2012/11/10/2764201.html
阅读全文
posted @ 2014-07-07 12:40
chuwachen
阅读(112)
推荐(0)
摘要:
IntroductionOne of the greatest logging tools out there for .NET is log4net. This software is the gold standard for how logging should be done. It is ...
阅读全文
posted @ 2014-05-09 13:19
chuwachen
阅读(224)
推荐(0)
摘要:
IIS Connection Timeout specifies how long, in seconds, should the code waitbefore timing out from trying to OPEN a connection. It relates directly tot...
阅读全文
posted @ 2014-05-09 09:49
chuwachen
阅读(383)
推荐(0)
摘要:
If you are writing server code in C# or to a lesser extent desktop/client then it's a good idea to include logging code so when something goes wrong y...
阅读全文
posted @ 2014-05-07 14:20
chuwachen
阅读(300)
推荐(0)