You can get the return type of the method by
Type returnType = method.ReturnType;
Then you can compare the type, invoke the method you want and convert it's return type to the type known in compile-time (in this example, SqlDataReader
)
if (returnType == typeof(SqlDataReader))
{
SqlDataReader Reader = (SqlDataReader)method.Invoke(Activator.CreateInstance(type),new object[] {arr});
}
Do the same for other cases
else if (returnType == typeof(string))
{
// invoke some other method and convert it's return type to a string ...
}