hi,
I'd like to ask a question about Reference:
1. Known Type's Name (String).
2. Known a public Method in the Class.
Assembly assem = Assembly.Load("Test");
Type type = assem.GetType("Test.TestClass");
Object obj = Activator.CreateInstance( type );
Object[] args = new Object[1];
args[0] = "Hello";
type.InvokeMember( "GetMessage", BindingFlags.InvokeMethod,
Type.DefaultBinder, obj, args );
// Then how to get the Return value?
namespace Test
{
public class Test
{
public String GetMessage( String message )
{
return message;
}
}
}
Thanks very much!