方法定义成接口类型是什么意思?
我想请问 public static JhFrame.Enterprise.Methods.MAdmin CreateAdmin() 方法定义成接口类型是什么意思?我不太懂,请大侠们帮忙解释一下!谢谢了先! 代码如下:
DataAccess.cs
程序代码:
public static JhFrame.Enterprise.Methods.MAdmin CreateAdmin() { string className = path + ".Admin"; return (JhFrame.Enterprise.Methods.MAdmin)Assembly.Load(path).CreateInstance(className); }
JhFrame.Enterprise.Methods.MAdmin MAdmin.cs
程序代码:
using System; using System.Collections; using System.Collections.Generic; using JhFrame.Enterprise.Entity; namespace JhFrame.Enterprise.Methods { public interface MAdmin { Int32 RecordCount(); Int32 PageCount(); } }