Hi...i need to execute a method "FindAll" in my page, but can be with any class. This method return 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 ObjectSoiurce, it returns ok, but i can't access the result. In VS2008, i can visualize the list by "ctrl + Alt + q" but by casting doenst work.
I forgot to say: this method "FindAll" is static!
please, help.