|
发表于 2020-6-8 13:45:01
|
显示全部楼层
接口
namespace InterFace
{
public interface Example
{
void Show();
}
}
类
namespace InheritClass
{
/// <summary>
///
/// </summary>
public class InheritExample : InterFace.Example
{
public InheritExample()
{
//
// TODO: コンストラクタ ロジックをここに追加してください。
//
}
public void Show()
{
}
}
}
具体调用
Assembly assembly1 = Assembly.LoadFrom (@"F:\201701\InheritClass\bin\Debug\InheritClass.dll");
InterFace.Example object1 = (InterFace.Example)assembly1.CreateInstance("InheritClass.InheritExample", true);
object1.Show(); |
|