We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get the (new Type()).InvokeMember(....) 's output value?

Thread ID:

Created:

Platform:

Replies:

2348 Jan 10,2003 03:56 AM UTC WinForms 0
loading
Tags: FAQ
Jack
Asked On January 10, 2003 03:56 AM UTC

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!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;