Using reflection


Author
Message
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)
Group: Forum Members
Posts: 153, Visits: 462
I have a reference in my project to a Sharpshooter Report. When I instantiate it, using the name of the the control "ListReportControl" in the second line below works, but I need to change that line to be able to specify a string variable that has the value of the report control. How would the line need to be changed to allow this?

string strReportName = "ListReportControl";

Control newSample = (Control)Activator.CreateInstance(typeof(ListReportControl));

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search