string DLLName = "MyDLL.dll"; string ClassName = "MyClass"; System.Reflection.Assembly oDLL; object oClass; // This "loads" the .DLL oDLL = System.Reflection.Assembly.LoadFrom(DLLName); // This creates the class instance oClass = oDLL.CreateInstance(ClassName);~~Bonnie
> private void listBox1_SelectedIndexChanged(object sender, EventArgs e) > { > string myRptClassName; > myRptClassName = listBox1.Text; > string myCommand; > myCommand = myRptClassName.Trim() + " rpt = new " + myRptClassName.Trim() + "()"; > > //Need to replace next line with some type of > //macro substitution based off the value in the myRptClassName variable > // foxpro would be > // myCommand=allt(myRptClassName)+[ rpt = new ]+allt(myRptClassName)+[()] > // &myCommand > > rpt_sch_Standard_Schedule rpt = new rpt_sch_Standard_Schedule(); > > this.viewer1.Document = rpt.Document; > rpt.Run(); > > } >