Error - Create excel from List<T>

Nov 2, 2010 at 6:20 PM


public static INode CreateExporter(object oLoop, string NameProp, string DefaultID)


//(T o,string NameProp, string DefaultID)

string t = "ST_Exporter.ST_Node" + "`1";

Type generic = Type.GetType(t).MakeGenericType(oLoop.GetType()); ------>>>>>>ERROR

return Activator.CreateInstance(generic, oLoop, NameProp, DefaultID) as INode;




when I try to call the method returns the following error (object not referenced).


the my type:

public class AnagraficaFarmacia    {      

 public string A{ get; set; }      

 public string B{ get; set; }      

 public string C{ get; set; }        

public string D{ get; set; }      

 public string E{ get; set; }



Nov 2, 2010 at 9:38 PM

What's the error?

Thank you