日期:2014-05-17 浏览次数:21079 次
private static System.Type GetImplType(string name)
{
string configName = System.Configuration.ConfigurationManager.AppSettings["DataAccess"];// 获取程序集名
string className = string.Format("{0}.{1}", configName, name); //拼接程序集+类名 使之完整
System.Reflection.Assembly.Load(configName); //加载程序集
System.Type type = System.Type.GetType(className); //通过类名 得到 类型
return type;
}