I need to execute a method "FindAll" in my page. This method returns a list of the object.
This is my method that I execute "FindAll". FindAll requires an int and returns an List of these class.
public void ObjectSource(int inicio, object o)
{
Type tipo = o.GetType();
object MyObj = Activator.CreateInstance(tipo);
object[] args = new object[1];
args[0] = inicio;
List<object> list = new List<object>();
object method = tipo.InvokeMember("FindAll", BindingFlags.Default | BindingFlags.InvokeMethod, null, null, args);
}
When I execute ObjectSource, it returns ok, but I can t access the result. In VS2008, I can visualize the list by "ctrl + Alt + q" but by casting doesn t work.
I forgot to say: this method "FindAll" is static!