注:
public static ReturnMessage CallAssembly(string Path
{
try
{
Assembly Ass=Assembly
Type TP=Ass
MethodInfo MI=TP
object MeObj=System
MI
return new ReturnMessage(true
}
catch(Exception e)
{
return new ReturnMessage(false
}
}
附ReturnMessage
public class ReturnMessage
{
public ReturnMessage()
{
this
this
this
this
}
public ReturnMessage(bool IsSucceed)
{
this
}
public ReturnMessage(bool IsSucceed
{
this
this
}
public ReturnMessage(bool IsSucceed
{
this
this
this
}
public ReturnMessage(bool IsSucceed
{
this
this
this
this
}
public ReturnMessage(bool IsSucceed
{
this
this
this
this
this
}
//
bool m_Succeed;
string m_Message;
int m_Code;
object m_Data;
object[] m_Datas;
public bool Succeed
{
get{return m_Succeed;}
set{m_Succeed=value;}
}
public string Message
{
get{return m_Message;}
set{m_Message=value;}
}
public int Code
{
get{return m_Code;}
set{m_Code=value;}
}
public object Data
{
get{return m_Data;}
set{m_Data=value;}
}
public object[] Datas
{
get{return m_Datas;}
set{m_Datas=value;}
}
}
From:http://tw.wingwit.com/Article/program/net/201311/12297.html