(1)不要在析构函数中.Close()数据层。
(2)尽量不要使用复杂的列表控件,太大,按照需求来,在.NET中,注重的是控件编程,就是非字符串输出的编程,衍生的就是时间,委托等,很多时候,继承IX接口编写自己的,这样可能更适合。
(3)
using System;
public sealed class Singleton
{
private static volatile Singleton instance;
private static object syncRoot = new Object();
private Singleton() {}
public static Singleton Instance
{
get
{
if (instance == null)
{
lock (syncRoot)
{
if (instance == null)
instance = new Singleton();
}
}
return instance;
}
}
}
赞
If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
QQ:154298438
QQ:417480759