日期:2014-05-18 浏览次数:20533 次
public class FileFactory { private static readonly string path = ConfigurationManager.ConnectionStrings["DBType"].ConnectionString; private static readonly string namespacepath = "xxx" public static IFileDal CreateFile() { string className = namespacepath + path + ".FileDal"; return (IFileDal)Assembly.Load("DLL name").CreateInstance(className); } }