标题:短短的
取消只看楼主
陈天
Rank: 1
等 级:新手上路
帖 子:66
专家分:0
注 册:2007-2-6
 问题点数:0 回复次数:0 
短短的

using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

using IDAL;

namespace DALFactory
{
/// <summary>
/// Abstract Factory class pattern to create the DAL implementation
/// </summary>
public class DBAccess
{
//look up the DAL implementation we should be using
private static readonly string path = "SqlServerDAL";

/// <summary>
/// Default constructor
/// </summary>
public DBAccess() { }

public static IUser CreateUser()
{
string classname = path + ".User";
return (IUser)Assembly.Load(path).CreateInstance(classname);
}
}
}

其中SqlServerDAL为具体实现。但是为什么出现这样的错误“Could not load file or assembly 'SqlServerDAL' or one of its dependencies. The system cannot find the file specified. ”

2007-02-12 16:22



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-120742-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.105632 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved