DAL层
namespace DAL
{
class Sql : TT
{
public bool Test()
{
return true;
}
}
}
IDAL层提供接口
namespace IDAL
{
public interface TT
{
bool Test();
}
}
//驱动
public class Drive
{
public TT drive()
{
return (TT)Assembly.Load("DAL").CreateInstance("DAL.Sql", false);
}
} //然后是业务
return (new Drive()).drive().Test()//后面的Test()不会自动出来?缺少了哪一步??出来的只有它默认的四个方法.ToString()等等..注:我都已经添加引用并using了..
namespace DAL
{
class Sql : TT
{
public bool Test()
{
return true;
}
}
}
IDAL层提供接口
namespace IDAL
{
public interface TT
{
bool Test();
}
}
//驱动
public class Drive
{
public TT drive()
{
return (TT)Assembly.Load("DAL").CreateInstance("DAL.Sql", false);
}
} //然后是业务
return (new Drive()).drive().Test()//后面的Test()不会自动出来?缺少了哪一步??出来的只有它默认的四个方法.ToString()等等..注:我都已经添加引用并using了..
如果可以那就是vs的问题了,编译不能通过就知道你的错误了阿