摘要:
手工进行资源释放:
一、 GC无法对非托管资源进行释放,所以我们必须自己提供方法来释放对象内分配的非托管资源,比如你在对象的实现代码中使用了一个COM对象;
二、 你的类在运行时会产生大量实例(象GIS中的Geometry),必须自己手工释放这些资源以提高程序的运行效率
System命名空间内有一个IDisposable接口 阅读全文
摘要:
usingLib01Class1=com.nblogs.reonlyrun.CSharp25QExample.Example19.Lib01.Class1;
usingLib02Class2=com.nblogs.reonlyrun.CSharp25QExample.Example19.Lib02.Class1; 阅读全文
摘要:
this保留字不能用于静态成员的实现里this 实际上是一个常量,所以不能使用 this++ 阅读全文
摘要:
可以通过new修饰符显式隐藏基类中的声明 阅读全文
摘要:
public string this[string Day] { get { string TodayWeather = null; //switch的标准写法 switch (Day) { case "Sunday": { TodayWeather = "Today is cloudy!"; break; } case "Friday": ..... 阅读全文