using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.Reflection;
using System.Web.UI;
using System.Web;
namespace BizReflectWork
{
public class ReflectFormat
{
string reletivePath = "";
public string ReletivePath { get { return reletivePath; } set { reletivePath = value; } }
string dllName = "";
public string ReflectDLLName { get { return dllName; } set { dllName = value; } }
string nameSpace = "";
public string NameSpace { get { return nameSpace; } set { nameSpace = value; } }
string className = "";
public string ClassName { get { return className; } set { className = value; } }
string method = "";
public string Method { get { return method; } set { method = value; } }
}
class Reflect
{
#region 调用反射
PublicMethod pm = new PublicMethod();
private Type GetAssemblyType(ReflectFormat refFormat)
{
string strparth = System.Web.HttpContext.Current.Request.PhysicalApplicationPath + "Bin\\" + refFormat.ReflectDLLName;
if (!System.IO.File.Exists(strparth))
return null;
Assembly MyAssembly = Assembly.LoadFrom(strparth);
Type t = MyAssembly.GetType(refFormat.NameSpace + "." + refFormat.ClassName);