什么叫做反射创建!烦请各位大虾解释下
红豆纱 2009-03-11 10:43:12 private static readonly string path = ConfigurationManager.AppSettings["ACCESSDAL"].ToString();
public static object CreateObject(string path,string CacheKey)
{
object objType = null;
try
{
objType = Assembly.Load(path).CreateInstance(CacheKey,true);//反射创建
}
catch(Exception ex)
{
throw new Exception(ex.Message);
}
return objType;
}