public static T xueshengbiaoDAO<T>() where T:class {string
string DllName = ConfigurationManager.AppSettings["DllName"];
Assembly assemblys = Assembly.Load(DllName);//載入程序集
Type[] Types = assemblys.GetTypes();
Type jiekou = null;
for (int a = 0; a < Types.Length; a++)
{io
if (typeof(T).IsAssignableFrom(Types[a]))
{class
jiekou = Types[a];
break;
}
}程序
return (T)Activator.CreateInstance(jiekou);
static
}sse